sorry first, because i ask a question that is not relative to ASM32.

I write a VC++ program, and want delete a folder use code below:

RemoveAllDirectory(LPCTSTR pstr)

TCHAR from[100];
lstrcpy(from, pstr);
lstrcat(from, "\0");

sh.hwnd = GetSafeHwnd();
sh.wFunc = FO_DELETE;
sh.pFrom = from;
sh.pTo = NULL;
sh.hNameMappings = 0;
sh.lpszProgressTitle = NULL;

SHFileOperation (&sh);

But when I want delete folder like: "C:\\Progra~1\Netscape\\user\\someone\\cache\0" it generate a dialog error: "Can not delete file: File system error (1026)"

Please try and help me!

Thank you!
Posted on 2001-11-24 03:06:16 by bung
> sorry first, because i ask a question that is not relative to ASM32
no problem, we fight all with (or against?) Microsoft :)

"File system error" seems to be an structural error, have you tried a scandisk on the drive?

Otherwise you can always try to re-produce the error using a normal explorer, since it uses itself SHFileOperation. Maybe
it tells you little bit more about the occured error.
Posted on 2001-11-26 06:02:35 by beaster
Dir beaster,

Thank you for your help. But I don't think that is the key of the problem!

When I use IE as default internet explore, I can delete cache folder of Netscape and can not delete cache of IE (like: c:\\windows\\temporary internet files\0). And when I use Netscape like default internet explore, I can not delete cache directory of Netscape (like: c:\\program files\\netscape\\users\\someone\\cache\0).

I think problem is system directory, which program is default program, its cache direcroty is system directory.

So, problem is "How to delete system directory, how to delete some files in system directoty?"

Although, Thank you anyway!
Posted on 2001-11-26 07:39:46 by bung
the problem is that are some "hidden" DLLs that use
that files and they are opened so you cannot delete

try to use
to see if the files are already open.

Posted on 2001-11-26 08:07:50 by TBD