need help again...IS file or directory
-
Dear All, Need your help again... I am developing an application in MFC VC++ Version 6.0 for Windows 2000. Is there any API provided for finding whether the given path is a filename or folder eg. c:\rfolder\mfolder\xyz.txt is a filename C:\Documents and Settings\Administrator.TEST is a folder Feel free to ask any further queries in this regards, Thanks Rohit Dhamija
-
Dear All, Need your help again... I am developing an application in MFC VC++ Version 6.0 for Windows 2000. Is there any API provided for finding whether the given path is a filename or folder eg. c:\rfolder\mfolder\xyz.txt is a filename C:\Documents and Settings\Administrator.TEST is a folder Feel free to ask any further queries in this regards, Thanks Rohit Dhamija
-
You can call
GetFileAttributes
and check if the returnedDWORD
has theFILE_ATTRIBUTE_DIRECTORY
bit set. (You may also want to take a look atGetFileAttributesEx
).Thanks, you are great henchook. Rohit