You Can’t Con Windows!

In wildly esoteric ‘not a bug’ news…

At work today, my buddy here was having a bit o’ difficult renaming a file on a ftp site. And on his local machine. Just a simple little gif file he wanted named ‘con.gif’. Short and sweet, and relevant to the site at hand.

Windows, however, was having none of this. Every attempt to name the file ‘con.gif’ resulted in the error: ‘Windows cannot rename the file. A file of the same name already exists.’ Completely stymied (particularly because there was no file named ‘con.gif’ in the folders he was working with), he asked me to come over and confirm that he hadn’t gone completely bonkers over the curse course of the day.

Sure enough, I attemped to rename the file. This is, as you can imagine, something I have done countless times before. Same result. I quickly checked his folder setup, ensuring that Windows was displaying hidden and OS files. Check, and check. Then I tried something you’re probably thinking of right now: I created a text file, naming it ‘con.txt’. Well, that’s not exactly true - I created a text file; on naming it ‘con.txt’, however, I received a remarkably familiar error: ‘A file of the same name already exists.’

Well, that was that. Quick search on Google, and I find that Windows will not allow you to name a file or folder ‘CON’, as it opens up a security hole. So it’s not a bug, it’s a feature.

I bloody wish they’d come up with a better error message to display.

Read the details @ mjsabby.com.

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Comments (5) left to “You Can’t Con Windows!”

  1. David Harris wrote:

    That on drove me crazey too
    I thought it was move a leave over from DOS days, where con was short for console….

  2. Jakub Koźniewski wrote:

    Hi…

    I’ve also googled on this topic and I’ve found that
    there is the same issue with “nul” filename…

    crazy…

  3. Jakub Koźniewski wrote:

    Here is full (I hope so) list o restricted Windows names:
    CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

  4. H.M. wrote:

    Hi
    Let me re write the list as:
    con,aux,com0..com9,lpt0..lpt9,prn nul

    hm.webmaster@gmail.com

  5. Yohan Liyanage wrote:

    Hi.
    These stuff happens because those are reserved keywords of the Operating System. For example, “con” stands for console. aux is for auxiliary, lpt1 for local printer port 1, com1 for Communications Port 1, Nul for Null and so on. You are not allowed to create files or folders using these names.

    It is commonly used in DOS to redirect output such as “copy con”.

    Regards.
    Yohan.

Post a Comment

*Required
*Required (Never published)