1

This question already has an answer here:

While modifying a node script I inadvertently created a directory with files in it called "Test..".

I have tried deleting it from explorer and it just tells me:

Could not find this item This is no longer located in c:\myparentfolder. Verify the item's location and try again.

But the directory is still there. Couriously if I create another directory called "Test" and then delete "Test.." from explorer, it will delete "Test" and leave "Test..".

I have also tried rmdir /s /q "Test.." but it just tells me that

The system cannot find the file specified.

How can I remove this folder?

marked as duplicate by gronostaj, Scott, Raystafarian, Kevin Panko, music2myear Sep 17 '14 at 13:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • .. is the magic sign for the previous directory. Perhaps it is searching for a folder named "Test" in the previous directory? – gparyani Sep 16 '14 at 21:39
  • If I go in and attempt to manually create this directory in File Explorer, it simply removes the .., creating a folder named "Test". I can delete this folder properly. I think that this is a bug in Windows that they fixed the wrong way (there were problems with having .. at the end of folder names, so they simply put a soft restriction against creation of such folders, but didn't consider the case where such a folder already exists, i.e. has been created by bypassing the soft restriction (through your script)) – gparyani Sep 16 '14 at 21:45
  • Have you tried deleting the directory using a node script? – Adam Sep 16 '14 at 21:46
  • @damryfbfnetsi that solution worked. – row1 Sep 16 '14 at 21:50
0
  1. Run chkdsk on that drive:

    chkdsk c:
    

    (or d:, or whatever the drive letter is).

    It may take some time, so be patient. If it's C: drive or it's in use, it may require rebooting.

    After chkdsk-ing the folder should be gone.

  2. If it's not, you can try to remove it through command line. Click on an empty part of the path bar of parent folder and type cmd:

    Screenshot of cmd entered in path bar

    Press Enter and type del test.., confirm with Enter.

  3. You could try to delete it using a LiveCD distro of Linux. LiveCD means it doesn't have to be installed to use it. Just boot some Linux (for example Ubuntu, which is probably most user-friendly), fire up file manager, navigate to your disk and delete the folder.

  4. Last thing I can think of: delete parent folder. It probably won't work on Windows if methods 1 and 2 will fail, but it could on Linux.

  • Did you notice that this is a duplicate question, and the author has said that the solution at the proposed target works for him? – gparyani Sep 16 '14 at 21:54
  • 1
    @damryfbfnetsi No, I didn't. I have started typing this answer before those comments appeared. – gronostaj Sep 16 '14 at 21:58
  • I always check for duplicates (and check if it needs closure for another reason) before answering a question. – gparyani Sep 16 '14 at 22:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.