searching file

1.If any folder name contains a dot(.) at the firsr(example: .gimp)what does that mean?For such case i have to use this code part:
if(FindData.cFileName[0]=='.')
return;
what is the reason?

2.what is the difference and meaning of this two lines:
strcat(tmpPath, "\\*");
strcat(tmpPath, "*.*");

i believe on most OS's the starting period can indicate hidden folder/file, or folders/files that are not shown on non-admin accounts, etc.

the first is saying to include sub-directories in the directory 'tmpPath', while the second can actually cause errors. if 'tmpPath' already has a '\' at the end, the second is saying to include all files in that directory... if there is no trailing '\' already in tmpPath, you could end up with something like: 'C:\some_directory*.*' which doesn't make sense. either make sure there is already a trailing '\' and don't add it in your first example, or make sure there isn't, and add it in both to avoid errors.
Topic archived. No new replies allowed.