I am trying to delete a directory and all it’s files and sometimes, but not always, it contains a hidden file “thumbs.db”. I cannot get the DIR$ command to see the hidden file. If I don’t remove the file, I can’t remove the directory (rmdir) - I get a path/file access error. Code below should get all files, including hidden files (does not get hidden files). I have tried 16 and 2 in place of 32 also. None give hidden files.
According to Designer Help, the second argument to the Dir function must be either one of the numbers in the table below, or the sum of the numbers matching the file types you want.
32 definitely won’t work. It’s not a sum of any of those numbers.
16 will return only non-hidden directories and normal files.
If you want hidden files along with normal files, but excluding directories, specify 2.
If you want hidden and normal files, and including directories, specify 18 (the sum of 16 and 2).
Mask
File attribute
Constant
0
Normal file
ATTR_NORMAL
2
Hidden file
ATTR_HIDDEN
4
System file
ATTR_SYSTEM
8
Volume label
ATTR_VOLUME. If any other attribute is specified, ATTR_VOLUME is ignored.