How to delete weird directory `=..`

0

Running this command 7z.exe e -o=.. example.zip created a directory =...

How can I delete it again?


  • Windows Explorer can not delete it: "An unexpected error is keeping you from deleting the folder. ... Error 0x80004005: Unspecified error"
  • Windows Explorer can not rename it either: "Could not find this item"
  • del =.. can not delete it: "Could Not Find =.."
  • rename =.. x does not help: "Access is denied."

Any other ideas?

windows
7-zip
asked on Super User Jun 26, 2019 by Peter

2 Answers

2

I found this solution which worked:

  1. dir /x told me the "8.3 name" of =.. was _5259~1.
  2. rmdir /s _5259~1 managed to delete the folder.
answered on Super User Jun 26, 2019 by Peter
1

Windows generally disallows paths ending with dots; or rather it strips all trailing dots, to maintain compatibility with really old software.

You can however bypass the Win32 path canonicalization using the \\?\ prefix:

rmdir "\\?\C:\Users\Peter\=.."

The syntax requires a full absolute path (drive letter and all), because you're also bypassing the code that normally expands relative paths. Quotes also seem to be required, due to the way Cmd's built-ins interpret punctuation.

answered on Super User Jun 26, 2019 by user1686

User contributions licensed under CC BY-SA 3.0