2

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.

4
  • Have you tried rebooting into safe mode and attempting to delete it from there?
    – Alex McMillan
    Commented Apr 5, 2013 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
    Commented Apr 5, 2013 at 22:24
  • Try Unlocker and you will have the access to delete it form your hard drive. :)
    – avirk
    Commented Apr 6, 2013 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? Commented Apr 7, 2013 at 3:18

4 Answers 4

3

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"

0

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

0

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

0

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.

0

You must log in to answer this question.