|
-
January 6th, 2004, 10:52 PM
#1
How to search for hidden folder?
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?
-
January 6th, 2004, 11:08 PM
#2
Try FindFirstFile() and pass in the directory.
Kuphryn
-
January 7th, 2004, 01:25 AM
#3
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
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|