FileExist() returns always 'D' if D:\FireFox\Profile\Default\Cache is empty (hidden files are shown to make sure it's empty)
CachePattern := "D:\FireFox\Profile\Default\Cache\*.*" MsgBox,4160,, % FileExist(CachePattern)
Can anybody confirm this behavior?
FileExist(FilePattern): Returns a blank value (empty string) if FilePattern does not exist (FilePattern is assumed to be in A_WorkingDir if an absolute path isn't specified). Otherwise, it returns the attribute string (a subset of "RASHNDOCT") of the first matching file or folder. If the file has no attributes (rare), "X" is returned. FilePattern may be the exact name of a file or folder, or it may contain wildcards (* or ?). Since an empty string is seen as "false", the function's return value can always be used as a quasi-boolean value. For example, the statement if FileExist("C:\My File.txt") would be true if the file exists and false otherwise. Similarly, the statement if InStr(FileExist("C:\My Folder"), "D") would be true only if the file exists and is a directory.