When I rightclick on a directory and select a self-written program that deletes it, the delete fails from TC 8.0, but not from Windows (XP) Explorer. That feels like a bug in TC.
The above is a simplified example of the problem of course, I do not just want to delete a directory.
To reproduce the problem:
With the registry editor create these keys and standard values:
HKEY_CLASSES_ROOT\Directory\shell\DelDir, Default value=Deldir
HKEY_CLASSES_ROOT\Directory\shell\DelDir\command, Default value=D:\DelDir.cmd "%1"
Create the file D:\DelDir.cmd containing:
rmdir %1 %2 %3 %4 %5 %6 %7 %8 %9
pause
With TC create some dummy directory and try to delete it by rightclicking on it and selecting DelDir: a command-window opens in which the following error-message can be read (translated from Dutch, so might not be exact): "The process has no access to the file because the file is being used by another process."
The Unlocker tool says that only cmd.exe is keeping the file locked.
But the same action (and thus the same "cmd.exe") works just fine when initiated from rightclicking to DelDir from Windows Explorer.
Therefore it feels like a TC bug.
Indirect rmdir fails
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sounds like the directory you are trying to delete is the current directory in that cmd script. Try to put aThe Unlocker tool says that only cmd.exe is keeping the file locked.
cd ..
command at the beginning of the script.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com