locked
Cannot Delete a file named "con.pdf" RRS feed

  • Question

  • Somehow someone magically created a document with the name "con.pdf". From what I understand "con" is a reserved keyword. Now we cannot delete this file. When we try to do so we get:

    ---------------------------
    Error Deleting File or Folder
    ---------------------------
    Cannot delete con: Cannot find the specified file.

    Make sure you specify the correct path and file  name.
    ---------------------------
    OK  
    ---------------------------

     

    Additionally, I've tried deleting the folder the file resides in, moving the file, renaming the file and nothing will remove this file. I've also tried doing "del *.*" from the command prompt and that doesn't work either. Any suggestions here? Thanks!

    Friday, December 3, 2010 9:56 PM

Answers

  • I got the file deleted ---- I had to use dos:

    I typed the following command:

    del \\servername\<drive letter>$\path_to_file\con.pdf


    Obviously <drive letter> is replaced with C,D,E or whatever the drive is.
    • Marked as answer by idspispopd Friday, December 3, 2010 10:05 PM
    Friday, December 3, 2010 10:05 PM

All replies

  • I got the file deleted ---- I had to use dos:

    I typed the following command:

    del \\servername\<drive letter>$\path_to_file\con.pdf


    Obviously <drive letter> is replaced with C,D,E or whatever the drive is.
    • Marked as answer by idspispopd Friday, December 3, 2010 10:05 PM
    Friday, December 3, 2010 10:05 PM
  • Tried the suggested command line Del. No good. The file doesn't show up in the directory. This matches the message that windows give essentially stating that the file doesn't exist. (Yet, indeed there it remains.. alas).
    Thursday, October 29, 2015 2:29 PM
  • if you try to use %> del con.<extension> it doesn't work.. try %> del con*
    • Proposed as answer by Marian Fischer Monday, November 16, 2015 11:49 AM
    Monday, November 16, 2015 11:22 AM
  • finally del command line  works for me !! thanks for your post idspispopd!
    Tuesday, April 4, 2017 2:47 PM
  • Rename the file in Explorer.

    rename con.pdf to con2.pdf

    then delete the file CON2.PDF

    The user had used an abbreviation 'con' for consult or 'contact'.

    This was a doozie for me too

    hope that helps.

    Monday, July 31, 2017 7:43 PM
  • Can't rename file, one could get a similar error message:

    `Cannot find path 'E:\X\Documents\Google Drive\School\Con.gdoc' because it does not exist.`

    The file exists, it is displayed when browsing with Explorer.

    It can also be displayed in the console when running `ls` in powershell for example

    PS E:\X\Documents\Google Drive\School> ls


        Directory: E:\X\Documents\Google Drive\School


    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    -a----       11/19/2007  10:25 PM            180 Con.gdoc

    It's sad that there these kinds of issues in Windows 10...


    • Edited by Victor_Stan Sunday, January 28, 2018 9:51 PM
    • Proposed as answer by Gwaed Thursday, February 8, 2018 1:14 AM
    Sunday, January 28, 2018 9:47 PM
  • I also found a solution as I have been having this problem myself with google drive as well.

    Start up your computer -> Run -> Type "CMD" and enter to open command propt.

    To make it easier i removed all the spacing out of my folders.

    In the command prompt i type "del \\.\G:\GoogleDrive\<path to file>\con.<file extension>"

    In my case the confile I had was called con.ai

    I found the solution on

    https://www.pcreview.co.uk/threads/cannot-delete-file-named-con-pdf.2332598/

    • Edited by Gwaed Thursday, February 8, 2018 1:15 AM
    Thursday, February 8, 2018 1:14 AM
  • If the folder is on a network, it may be necessary to use the UNC filepath rather than the driveletter filepath.
    Thursday, June 7, 2018 4:40 PM
  • I shared the parents folder then delete it from network places.
    Wednesday, November 28, 2018 9:18 AM