Click to See Complete Forum and Search --> : RemoveDirectory and _rmdir do not work.


John_Reese
May 26th, 1999, 03:14 AM
The RemoveDirectory(strdir) and _rmdir(strdir) are not working...Any ideas?

Marqy
May 26th, 1999, 03:42 AM
Did you remember that path strings (if they are literal) need double-backslash characters?

RemoveDirectory("C:\\MyDir\\MySubDur");



Also, the function will fail if there are any files in the directory or you have an active DOS session in that directory.

MJA

rajasekar.s
May 26th, 1999, 03:44 AM
check SHFileOperation

John_Reese
May 26th, 1999, 04:43 AM
Yes, the strDir path is correct, and the directory structure is empty of files (deleted earlier). There are also no DOS boxes active within the structure. RemoveDirectory gives an "Files being used by another process" error and _rmdir gives no error, but also does not delete. The code is running on WinNT. If you can offer any more help, it would be much appreciated.