ReadDir, but not hidden directories

Blitz3D Forums/Blitz3D Programming/ReadDir, but not hidden directories

Vignoli(Posted 2011) [#1]
Hello,

I'm using the ReadDir command to have the list of the available directories, but when i test it in C: i get the "Documents And Settings" folder in my list. (i've windows 7)

Is there a b3d command i can use to know what folder is hidden and what folder is not hidden ?


Rob the Great(Posted 2011) [#2]
Try this:

http://www.blitzbasic.com/codearcs/codearcs.php?code=2177

Look for the function to get the file attributes. Haven't tested it yet, but it sounds like the function will return "HSA" if a file is hidden. You might be able to modify this to check directories as well.


Vignoli(Posted 2011) [#3]
Thanks a lot


*(Posted 2011) [#4]
HSA is Hidden, System, Archived IIRC there is also R for Read only


xlsior(Posted 2011) [#5]
i get the "Documents And Settings" folder in my list. (i've windows 7)


Under windows vista and 7, "Documents and settings" isn't a real folder but a Junction that re-directs to c:\users (for compatibility with older apps that have the 'documents and settings' part hard-coded)

(If you do a 'dir' command from the command line, you see it defined as <JUNCTION> instead of <DIR>. Comparable with a symbolic link under Linux. There's tools out there that allow you to create your own junctions, which can be handy at times where you run out of space on a particular harddrive and want to move stuff to another one transparently)