• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Windows 10 - Cannot delete Directory

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

TollhouseFrank

Senior Headphone Guru
Joined
Nov 29, 2004
Location
T3h Intr@tub3z!
On my 2nd HDD, I have a directory labeled "SteamBackups" that i made temporarily to make backups of my game installers before them transferring them to an external USB HDD. Worked fine for that except for one issue. 1 of the Directories created says it does not exist (yet it still clearly does, as I cannot delete it). Once I cleared out all of the other game installer backups in that folder, I went to delete the SteamBackups folder. It shows as "Item not Found". I can take full ownership of "SteamBackups", yet it still tells me Item Not Found.


I then opened up an elevated (admin) command prompt and tried (name of my 2nd HDD is Q)

Q:\> rmdir /q /s \SteamBackups

yet what I get is the error:

>rmdir /q /s \SteamBackups\F.E.A.R.
The System cannot find the file specified

What am I doing wrong in deleting this not-needed/non-existent directory that still shows up?


***EDIT***

nevermind.... within moments of posting this, i found the following solution on SevenForums.com

Successful solution:
1. Download 7zip
2. Browse to folder
3. Right-click rename (successful)
4. Close 7zip
5. Browse to folder > right-click delete


**********************

I do not know how or why 7zip could do this and windows own built in command line could not. But if it works, what else do I have to complain about?
 
Last edited:
Can't say for certain, but I would guess it had something to do with the directory's name. Perhaps it had some non-printable character that the command line couldn't interpret without being escaped or enclosed in quotes.

Did you try deleting it through Windows Explorer before trying 7zip?
 
Do a scan disk and then try.


Here's a Take Ownership right click:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
 
Back