populate list box with directory

that was it! Thank you Tim and Joachim!

Hello guys,

I`m working on something similar and it seems that when i scan folder structure it shows me the .files also

How can i doit so it does not put the dot files in the list anymore ?

Thanks

The only way I see is to check for.

if left(f.name,1) <> “.” then
//Add it to the list

thanks , it worked, i just iterate the files and checked if the first file is .DS than it changed the loop from 2 to n else 1 to n

that did the job .

I would check only for the period as the first character. It is possible to have more than just the .DS_Store file as a hidden file in the folder. Unless, of course, the .DS_Store file is the only hidden file that you want to ignore.

Another thing to think of. I sometimes like to name a file, or folder, with a blank as the first character so that that file or folder will appear at the top of the list in a directory list. This will then come before any hidden file that starts with a period. From what you stated above it sounds like you are going through the list of files twice, once to seen if there are any hidden files and then again to process the non-hidden files. Seems like it would be better to only do it once. If the file is non hidden add it to the listbox and if it is hidden just ignore it. I doubt if I am the only person who ever uses the blank as the first character trick. It lets me keep a meaningful name and yet have the file appear at the top of the list.