Unable to delete folder ending with "." period "Could not find this item" error 0x80004005

Wonderful-Mango 0 Reputation points
2026-03-12T20:08:21.64+00:00

I found a solution to this so am posting here for others who may encounter the same scenario

So I have no idea how i managed it but I somehow renamed a folder in file explorer from "two" to "two." with a period at the end. I have no idea how I managed to do that as I am unable to re-create by renaming or creating folders in windows explorer with a period at the end nor in powershell or terminal or cmd using ren or md. The folder had content in it but explorer did not allow me to open the folder. I tried to rename the folder in powershell and command prompt using ren however I got an error stating the folder could not be found.

In the end, I read about winrar and instead used 7z file explorer to navigate to the folder and was able to open it and see my files that were inside. I simply renamed the folder to remove the trailing period by right clicking it in the 7z and choosing rename from the context menu and the folder instantly renamed in windows explorer and was accessible again.

Unsure how or why this happened and also why it was impossible to use native windows tools, (powershell, command prompt and explorer) to fix the issue and had to resort to a 3rd party file manager.

is there any way using native windows built in tools i have missed that could fix this?

I hope this helps anybody with the same issue in future - 7z or winrar file explorer to remove the trailing period.

Windows for home | Windows 11 | Files, folders, and storage
0 comments No comments

1 answer

Sort by: Oldest
  1. AI answer

    2026-03-12T20:08:41.2466667+00:00

    Windows uses two different layers for file names:

    • NTFS (the file system) allows names with trailing spaces or periods.
    • The Win32 API (what Explorer, cmd, and most tools use) treats trailing spaces/periods as invalid and silently strips them.

    So a folder physically named two. can exist on disk, but Win32-based tools see it as two and then fail with errors like "Could not find this item" when trying to open/rename/delete it. This is why Explorer, cmd (ren), and PowerShell could not work with the folder, while 7-Zip (which uses lower-level APIs) could.

    There is a native workaround using Win32’s extended path syntax (\\?\) that lets commands bypass the usual name normalization. For example, from an elevated Command Prompt:

    ren "\\?\C:\full\path\to\two." two
    

    Or to delete:

    del "\\?\C:\full\path\to\two."
    rd  "\\?\C:\full\path\to\two."
    

    This \\?\ prefix tells Windows to pass the path directly to NTFS without stripping the trailing period, so the operation succeeds.

    The behavior is consistent with how NTFS and Win32 handle invalid or reserved names and trailing characters; Explorer and standard command-line tools cannot reliably work with such names, which is why third-party tools (or the \\?\ syntax) are needed.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.