0

I have a similar problem as in Can't delete folder (in Windows 10) that contains special character in that I get the exact same error message when trying to delete a specific folder.

From Can't delete folder (in Windows 10) that contains special character and from Can't delete folder in Windows 7, it seems the work-around is to try to use the 8.3 DOS name.

But, when I do a dir /x, I don't get an 8.3 DOS name... Per the dir help page:

/X This displays the short names generated for non-8dot3 file names. The format is that of /N with the short name inserted before the long name. If no short name is present, blanks are displayed in its place.

So, I guess in my case my directory does not have an 8.3 equivalent and that's apparently a "normal" thing. I did not see any other suggestions on how to delete directories with special characters, short of booting a live version of Linux...

Any other ideas?

2
  • 2
    What is the exact name of the folder you are trying to delete?
    – LMiller7
    Sep 14, 2018 at 3:33
  • The exact name as best as I could tell is "Life of Christ) "... I'm guessing the ")" is what is giving windows heartburn--either that, or the " " at the end is some non-printable control char. Sep 14, 2018 at 3:36

1 Answer 1

0

So, as soon as I posted this question, I thought of trying robocopy--and it worked!!

Note: This solution involves overwriting directories, so your problem file or directory can't be in c:\ (at the root of your boot drive) and it really needs to be isolated. So if your "bad" file is c:\bad, then you're out of luck using this solution unless you can somehow move it into c:\x\bad. Also, if you have other files in that same directory as your "bad" file, move all the other files elsewhere temporarily.

If your problem file or directory is some directory levels down and isolated by itself, try this:

Assumption for this example, the "bad" file or directory is: c:\x\bad

Step 1: Create c:\y directory and leave it empty.

Step 2: robocopy c:\y c:\x /mir

You should see robocopy reporting deletion of the extra file or directory and the result should be that c:\x is now empty.

The only time this has not worked for me is when explorer had an open file-lock that interfered--I closed all open explorer windows and it cleared up... sometimes, you have to go all the way and restart explorer from the task manager or simply reboot... but once the file lock is gone, robocopy will do its thing.

Works like a charm!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .