A folder has been hidden from the view of Explorer and MS DOS box, I can't see the folder even setting the Explorer to show all files.
Is there a way to confirm this folder does exist under Windows98 if I know the folder name?
Printable View
A folder has been hidden from the view of Explorer and MS DOS box, I can't see the folder even setting the Explorer to show all files.
Is there a way to confirm this folder does exist under Windows98 if I know the folder name?
Try FindFirstFile() and pass in the directory.
Kuphryn
Code:CString szPath("c:\\windows");
DWORD dwAttr = GetFileAttributes(szPath);
if (dwAttr == 0xffffffff)
{
DWORD dwError = GetLastError();
if (dwError == ERROR_FILE_NOT_FOUND)
{
// file not found
}
else if (dwError == ERROR_PATH_NOT_FOUND)
{
// path not found
}
else if (dwError == ERROR_ACCESS_DENIED)
{
// file or directory exists, but access is denied
}
else
{
// some other error has occured
}
}
else
{
if (dwAttr & FILE_ATTRIBUTE_DIRECTORY)
{
// this is a directory
}
else
{
// this is an ordinary file
}
}