command-promptpromptdelete-directory

Delete stubborn folder with points in name


I'm trying to delete a folder with weird name: "T.E.E.M."
Windows doesn't recognize this kind of name and even tell me the folder can't be found (it was created via NodeJs, but i don't know why windows allowed it).

enter image description here

I tried to delete it normally and it says that the folder can't be found because it doesn't exist.

enter image description here

I tried in prompt too, using the 2 commands del "T.E.E.M." inside the right folder and Rmdir /S "T.E.E.M." but they both don't work. Any suggestion?


Solution

  • Windows cannot handle files/folders ending on a period-symbol ('.'). That's what I discovered when I tried to create the "T.E.E.M."-folder myself. I ended up with a "T.E.E.M"-folder (without the last period). So this might do the trick for you:

    del "\\?\<full path to file>"
    

    but since this is a directory, maybe

    rmdir /s "\\?\<full path to file>"
    

    works better.

    By entering \\?\ string parsing is disabled.

    Original answer found here.