windows 7 - How to delete these Folders that created by system with long name?

06
2014-04
  • Amr Badawy

    Possible Duplicate:
    Can't delete folder in Windows 7

    After 2 months of installing windows 7 and my applications i found a lot of useless folders in D:\ as in the below image and i can't delete them although they are empty

    alt text

    Is there any way to delete such useless folders ??

  • Answers
  • Alberto Martinez

    That folders are leftovers of the installation of MS products, usually Windows updates. They are the temporal folders used by the installer.

    Warning: There is a small possibility that deleting that folders could break something in Windows.

    Usually they can be deleted without problems from Windows Explorer, but from time to time it seems that something fails in the installation and Windows keeps a reference to the temporal folder. The most extreme case I have seen was in my girlfriend computer when Windows (XP) was loading a driver from the temporal folder itself instead of from the system folder (so I couldn't get rid of it).

    If you are decided to delete that folders, you can use use Process Explorer to find what references are hold to the folders and remove them:

    1. Go to Find > Find handle or DLL and type the name of one of those folders, it would list the process that are using it (technically that have an open handle on them).
    2. Double click in the first result, it would highlight the reference (open handle) in the main window.
    3. Right click and select Close handle.
    4. Repeat the process if there are more references to the folder.

    After this you should be able to delete that folder.


  • Related Question

    How to delete ".."-folder under Windows Vista?
  • acme

    I have a folder on my desktop which is named ".." (which itself contains subfolders with an empty name). The folder can't be deleted the usual ways, even not when using the CLI. Does anyone know how I can remove this folder on Windows Vista 64bit?

    Renaming does not work, too (obviously).

    This is what "dir /x" echoes:

    09.10.2009  15:04    <DIR>                       .
    09.10.2009  15:04    <DIR>                       ..
    08.03.2007  11:18    <DIR>                       cgi-bin
                   0 Datei(en),              0 Bytes
                   3 Verzeichnis(se), 45.866.037.248 Bytes frei
    

  • Related Answers
  • Joshua

    You can use the special \\?\ syntax to try and remove the directory. Try as I might I was unable to create a directory with just .. in it, but was able to create a file with a space before it and .. (so ..) and explorer and normal tools were unable to remove it.

    To use the \\?\ syntax you have to fully qualify the path. e.g.:

    rmdir "\\?\C:\Users\acme\Desktop\.."
    

    Try pressing the tab key to cycle through directory names on your desktop once you get tot the final \ after Desktop. If you do, Windows will start auto-completing the directories that exist under that folder. I suggest this since the actual directory name could be something like .. or .. which would cause the above command to fail with "Cannot find directory".

    EDIT: If it isn't a directory but a file (explorer may show it's a "directory" since .. points to the parent directory) you can use the same \\?\ syntax with the del command.

  • seanyboy

    dir /x will tell you the proper name of the folder.

    09/10/2009  15:05    <DIR>                       ..
    09/10/2009  15:05    <DIR>          5C51~1.-      .. -
    29/09/2009  13:14    <DIR>          BUSINE~1     .businessobjects
    

    Then you just have to delete the folder using that short name.

    rmdir 5C51~1.-
    
  • Arjan

    [A note, given the upvotes: the question is not about the regular Dos or Unix-like "." and ".." for the current and parent directory. It's really about a folder with that name. So, the answer below does not apply. AvB.]

    Correct me if I'm completely misunderstanding the question, but in Windows ".." is the current folder's parent.

    That is, from the command line, doing cd .. while in the Desktop folder, will take you to its parent (C:\Users\username\ on my x64 Win7 machine).

  • quack quixote

    Navigate to your desktop in a command window ("cd C:\Users\YourUserName\Desktop"). Type "DIR /X" -- this will spit out a directory listing.

    There will be two entries at the top named "." and "..". Look for another ".." AFTER that, in the right-most column. Does it have another name in the next column? That's the short filename. Type "rmdir /s [short-filename]". Reread what you typed. Reread again -- make absolutely sure you typed it right before you hit enter.

    Do NOT run "rmdir /s .." -- bad things will happen.

  • Vili

    Did you try chkdsk or similar? (Don't know if there is chkdsk on vista.)

  • Paul

    Suggestion (1) Login as a different user, move all your valid files out of Desktop directory, then delete/recreate it.

    Suggestion (2) Win32 unix tools usually work a bit better than the cmd equivalents, so I would give them a go. At the very least they're worth installing:

    http://unxutils.sourceforge.net/

  • harrymc

    As I never saw a directory with that name, I can only suggest to try using old DOS.
    Use in the Command Prompt, or cmd.exe, the dir command with the -x parameter.
    If the file is displayed with any other name than "..", use the del command:

    del file~1.MOV

    If this doesn't work, try:

    del ".."

    Otherwise, move everything else out of the directory and use implicit del:

    Del *.*

    then return the moved files back.

  • Bob

    I think Unlocker can help you. It is a very simple tool and works with vista x64.

  • invert

    To the poster above who said to enter "del ..", do not do this. It will prompt you 'Are you sure (Y/N)?' and answering Y will delete all files in the directory BELOW. Sorry for posting in the answer box, but I only joined yest and can't post comments yet.

    Try boot a Linux Live CD and remove the '..' directory through there.

  • Tom Wijsman

    Boot with a Linux live cd and make sure you have access to the hard drive, ... then in terminal run:

    sudo rm -R /path/to/file/or/folder/named/..