/// <summary> /// Loop Through File Pattern/Folder, Return Number of Files Found /// </summary> /// <param name="Directory">Path to Folder to Search For FileCount</param> /// <param name="SearchPattern">File Pattern to Match For FileCount, Default = *.*</param> /// <param name="IncludeFolders">Add # of Directories Found to Total File Count</param> /// <param name="Recurse">Option to Include Files Found in Subdirectories. Default = true</param> /// <returns></returns> public static int FileCount(this string Directory, string SearchPattern = "*.*", bool IncludeFolders = false, bool Recurse = true) { _AHK ahk = new _AHK(); return(ahk.FileCount(Directory, SearchPattern, IncludeFolders, Recurse)); }