Hello,

How to get information about type of file which does not have extension.
If I have folder named as [ABC] and also file name same as [ABC] without any extension.
I am using FindFirstFile() function to get folder information.

char path[3] ="C:\ABC"
HANDLE	hFind;
WIN32_FIND_DATA	FindFileData;
hFind = FindFirstFile(path, &FindFileData);

Above example works fine, when I have [ABC] folder in C: drive.
But if I don't have that folder, instead I have some file with same name without extension, it displays microsoft error.

My Question->How to I get the information about unrecognized file ?

Please help me on this.

Thanks in advance.

>> Above example works fine

No it doesn't. Look at this and tell me what's wrong:

>> char path[3] ="C:\ABC"

I see 3 things wrong with this line alone. If you want to get a useful reply, post the code you're actually using.

Comments
Yes.

>> Above example works fine

No it doesn't. Look at this and tell me what's wrong:

>> char path[3] ="C:\ABC"

I see 3 things wrong with this line alone. If you want to get a useful reply, post the code you're actually using.

Sorry, my mistake. This was not a copy paste code. Because of some reasons I coudn't not copy the actual code here.

correct code ->

char path[7] ="C:\\ABC";

My main focus was to let you know about the function FindFirstFile function that I am using.

Anyway thanks to notify the mistake.

This article has been dead for over six months. Start a new discussion instead.