Type File
-
Hi all, Can Anyone tell me how i can check the type of a file?I mean i want to add checking file if the file not a .doc files then i want to show message box To show that the file extension is not .doc files Thank U For The Help :-D
Regards, Tomi
-
That is a basic check. It will not work if a DOC file is named, say, XLS. To be sure, you have to look at the file header.
Cheers, Vikram.
"I will put my new found knolage to good use" - Captain See Sharp. "Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
-
The right way to do this is going to be using the
SHGetFileInfo
Win32 API. You will need to retrieve theSHGFI.TYPENAME
value.Scott. —In just two days, tomorrow will be yesterday. —Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[Forum Guidelines] [Articles] [Blog]