Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to delete a folder named ~ in Windows 7?

I created it by accident, and any time I try to access it or delete it from Windows Explorer or command window, they freeze and could not be closed or ended even from Task Manager. Windows could not even properly shut down after that.

share|improve this question

migrated from stackoverflow.com Apr 5 '13 at 23:36

This question came from our site for professional and enthusiast programmers.

    
Have you tried rebooting into safe mode and attempting to delete it from there? –  Alex McMillan Apr 5 '13 at 22:23
1  
Welcome to StackOverflow. This site is for programming (code) or programmer's tools related questions, not general computer or operating system support. The faq has more info about what types of questions are proper to ask here. Voting to close and move to a more suitable site. Good luck. :-) –  Ken White Apr 5 '13 at 22:24
    
Try Unlocker and you will have the access to delete it form your hard drive. :) –  avirk Apr 6 '13 at 1:27
1  
There's nothing abnormal about a folder named ~ in Windows, it's fine and should work like any other folder. Have you scanned the drive for drive/file system errors (chkdsk)? How long did you let it sit while it was being unresponsive? –  Ƭᴇcʜιᴇ007 Apr 7 '13 at 3:18

4 Answers 4

You can try rd

example

Syntax
      RD pathname
      RD /S pathname
      RD /S /Q pathname

Key
   /S  : Delete all files and subfolders
         in addition to the folder itself.
         Use this to remove an entire folder tree.

   /Q  : Quiet - do not display YN confirmation

You can also use it with the Win32 File Namespaces syntax for dealing with odd cases:

rd /s "\\?\DRIVELETTER:\FOLDERNAME"

share|improve this answer

If everything else fails, you can always boot to some GNU/Linux LiveCD, mount your drive, delete the folder and reboot.

share|improve this answer

I can create an delete a directory named ~ without any problems.. make sure you're using RD like @Steven Penny explained.

However, based on your description it sounds like something has locked access to the directory. Have you tried rebooting? Can it be deleted after a reboot?

You can try the OpenedFilesView application to view the files (and folders) that are currently opened and what process (executable) has them opened: http://www.nirsoft.net/utils/opened_files_view.html

share|improve this answer

You can use a utility named Unlocker.

EDIT: Unlocker is a windows utility program that will unlock locks placed on a file or a file in a folder, or a folder itself. Once the file or folder is free of the locks the file or folder can be deleted.

Because the program displays the process that has the file or folder locked, it can be useful for discovery.

On the unlocker site they suggest that it can solve:
Cannot delete: It is being used by another person or program.
Cannot delete file: Access is denied.
There has been a sharing violation.
The source or destination file may be in use.
The file is in use by another program or user.
Make sure the disk is not full or write-protected and that the file is not currently in use.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.