4

I have a folder on my desktop called con.

15/02/2016  11:29    <DIR>          con

I cannot open it

unopenable folder

I have tried the following

  1. run cmd as administrator
  2. kill explorer.exe
  3. rmdir con

C:\Users\sean\Desktop>rmdir con /s

con, Are you sure (Y/N)? Y

Access is denied.

  1. Set the security settings

security settings

The only option remaining that I have seen is to use a gparted on a linux distribution. However, there must be a way to do it in windows?

Does anyone know why this is happening and how to delete an unopenable and undeletable folder in Winodws 10?

3

2 Answers 2

3

Source: http://answers.microsoft.com/en-us/windows/forum/windows_8-files/a-folder-that-refused-to-be-deleted-invalid-file/a8506e19-d623-4af0-ab19-0fd17a672a3a

Solution quote modified to suit your folder location

Solution You can remove this using the command line, but will want to reference the location differently than you normally would (using UNC).

If the folder is C:\Users\sean\Desktop\con, then this command entered on the command line will remove it:

rd \\.\\c:\Users\sean\Desktop\con /S /Q

rd is the command line tool to remove the directory.

\\. refers to the current computer.

\c:\Users\sean\Desktop\con is the path of the offending folder entry.

/S is a switch that tells rd to remove all subdirectories and files (like the old DELTREE command).

/Q is a switch that tells rd to this removal silently (you won't be prompted for removing the contents).

Change the \c:\Users\sean\Desktop\con path to whatever the location is for your CON folder.

This deletes the entire folder and its contents. It may be possible to rename or copy the folder to another name. I didn't have much luck with the rename, but I also didn't spend too much time on it.

Note that although you can use Windows Explorer to browse to the location \., Explorer doesn't let you delete the folder. You need to use the command line to remove the CON folder.

4
  • Thanks for the suggestion. I get the following response: C:\Users\sean\Desktop>rd \.\c:\Users\sean\Desktop\con /S /Q The system cannot find the path specified.
    – SeanJ
    Apr 26, 2016 at 9:13
  • For some reason the editor has removed a black slash from my answer. it should start with TWO backslashes. E.g. rd backslash backslash point(dot)
    – Kinnectus
    Apr 26, 2016 at 9:15
  • Thanks Chris just tried C:\Users\sean\Desktop>rd/s \\.\\c:\Users\sean\Desktop\con \\.\\c:\Users\sean\Desktop\con, Are you sure (Y/N)? Y and it worked!
    – SeanJ
    Apr 26, 2016 at 9:16
  • The solution that worked needs to be added to this answer or the original question. Makes it easier for users to find answers.
    – Moab
    Apr 26, 2016 at 18:00
1

Try this.

RD /S /Q c:\Users\sean\Desktop\con
  • RD stands for Remove Directory
  • /S deletes all subfolder and files
  • /Q deletes with no more confirmation required

Not the answer you're looking for? Browse other questions tagged .