How to Delete a Folder with a Special Name (ie COM1)
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.
Because the folder has the same name as a reserved system device, Windows gets confused when trying to browse or navigate the folder.
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
- Open up a command prompt.
ren "\\.\C:\System Volume Information\COM1" TEMP
Reset the Permissions on the Folder
- Open up Windows Explorer and right-click on the folder. Select Properties.
- Click the Security tab and then click the Advanced button.
- On the Permissions tab, click Add.
- Click the Locations button and select the local computer and then click OK.
- Under Enter the Object Name, type Administrators and click OK.
- Click Allow next to Full Control. Then check Apply these permissions and then click OK.
- 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
Open up a command prompt.
rmdir "\\.\C:\System Volume Information\TEMP" /S /Q
- The folder will now be deleted.