How to Delete a Folder with a Special Name (e.g. COM1)

 
How to Delete a Folder with a Special Name (ie  COM1)
Issue
There is a folder on your server that has the name of a reserved system device (such as COM1, PRN, or CON). You need to delete the folder but are unable to.

Cause
Because the folder has the same name as a reserved system device, Windows gets confused when trying to browse or navigate the folder.
 
Resolution
This resolution assumes that the folder is located at C:\System Volume Information\COM1 and you would like to rename it to TEMP, explore its contents, and then delete it.

Rename the Folder
  1. Open up a command prompt.
  2. Type:
    ren "\\.\C:\System Volume Information\COM1" TEMP
Reset the Permissions on the Folder
  1. Open up Windows Explorer and right-click on the folder.  Select Properties.
  2. Click the Security tab and then click the Advanced button.
  3. On the Permissions tab, click Add.
  4. Click the Locations button and select the local computer and then click OK.
  5. Under Enter the Object Name, type Administrators and click OK.
  6. Click Allow next to Full Control.  Then check Apply these permissions and then click OK.
  7. Check Replace the permission Entries box and then click OK, then YES, and then OK.

Explore the Folder
You may now browse the folder via Windows Explorer.
 
Delete the folder
  1. Open up a command prompt.
  2. Type:
    rmdir "\\.\C:\System Volume Information\TEMP" /S /Q
  3. The folder will now be deleted.

Add Feedback