Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
may i know how to check whether the directory is exist or not in the hard disc using C/C++?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <windows.h>
....
DWORD dwAttr = GetFileAttributes ( "C:\\Is\\This\\Dir\\Present");
if ( dwAttr == 0xffffffff )
{ // Some error occurred, directory not present
// Call GetLastError ( ) to find out reason
// for failure here
....
} else
{ if ( dwAttr & FILE_ATTRIBUTE_DIRECTORY )
{ // Direcory present
} else
{ // Name present, but is not a directory
} }