≡ Menu

How To Create/Delete A Folder Named “Con” In Windows

There are a few differences in Windows and Linux on how they use the names of their system variables. For example, a user in Windows can’t directly create a file or folder named “CON” because it is a system variable used by the system.

Although you can’t create the file, you can move a file named “CON” from the Internet or other media to Windows hard drive. You can also rename a file or folder to CON using ASCII characters. To rename a file/folder to CON, just follow the instructions below:

  1. Right click the file and select rename.
  2. Now, press Alt + 2 + 5 + 5 from the number pad of your computer.
  3. Type CON from the keyboard and press enter.

This will rename the file or folder to CON without any problems. The problem is that you will not be able to delete the file or folder directly using the context menu or the delete key.

To delete this folder, you will need to follow the instructions below:

  1. Open command prompt with administrative privileges
  2. Run the following command:
    rd /s "E:\Users\Usman\Desktop\con"
removing the con directory in Windows

The /s switch will delete the folder con and everything inside it. ? is for telling Windows to stop parsing file names.

You can also use the following command to make a folder named CON using the command line:

md "c:\Users\Usman\Desktop\con"

Also Read:

About the author: Usman Khurshid is a seasoned IT Pro with over 15 years of experience in the IT industry. He has experience in everything from IT support, helpdesk, sysadmin, network admin, and cloud computing. He is also certified in Microsoft Technologies (MCTS and MCSA) and also Cisco Certified Professional in Routing and Switching. Reach him at Twitter @usmank11

{ 17 comments… add one }
  • alex January 27, 2021, 3:41 PM

    idk why its still giving me access is denied btw should I include ‘\\?\’
    when I don’t include it gives me ‘Access is denied’ but I include it it gives me ‘The system cannot find the file specified.’

    what to do pls help me

  • Alex January 10, 2021, 3:12 AM

    I succeed to delete the “CON” folder using this command.
    example:
    rd “\\.\c:\documents\con” /S /Q

    of couse replace with your path

  • Chinna September 4, 2020, 8:57 PM

    For me it saying after using above command
    ”access is denied’!.
    An one help me!

  • pleasehelpmeimindireneed August 31, 2020, 2:55 AM

    how do i delete a con folder with stuff in it please help

    • Usman Khurshid August 31, 2020, 5:18 PM

      You can use the following command:
      rd /s “E:\Users\Usman\Desktop\con”

      Just replace the path with your own path.

      • pleasehelpmeimindireneed October 29, 2020, 7:08 AM

        I tried opening as administrator and it still didnt work same with thing above help i think it was a folder with stuff in it i put in there if that helps.

  • jaavaad February 27, 2019, 1:12 PM

    How can change name nul folder I cant open it I put something in it and now..

  • Percussionking March 10, 2018, 10:15 PM

    This didn’t work for me (2018-03-10 Windows Server 2016), but I shared the root drive with a Linux machine and Linux was able to delete it.

  • cali December 30, 2017, 12:04 PM

    Thank you so mutch i Couldnt delete this Shit for so Long XD but bether type rd /s \\?\”C:\Users\%username%\Desktop\con” if you dont know anything about CMD

    • AD March 20, 2018, 10:11 AM

      Thanks Mate, It worked for me..

    • jeremy March 26, 2018, 9:17 PM

      it worked when i transferred the file to the downloads and did the instructions.

  • sumay October 28, 2017, 5:58 AM

    just great finally I have been able to do this trick..

  • G manikandan September 1, 2017, 3:18 PM

    thank you sooooo much it worked in my win 10

  • Bob June 17, 2017, 8:50 PM

    thanks, all other solutions i found missed the “/s \\?\” oart of the command

  • Cuba Perpetual March 30, 2017, 7:19 PM

    Woah! it worked! thanks!

  • Pawan Pandia July 30, 2016, 1:59 PM

    Thanks.. its really work

Leave a Comment