Why You Can’t Name A File CON In Windows

Why You Can’t Name A File CON In Windows

The short answer is “backwards compatibility”. The long answer is… well, it’s the rest of this video.

MORE BASICS: https://www.youtube.com/playlist?list=PL96C35uN7xGLLeET0dOWaKHkAlPsrkcha

Written by Sean M Elliott and Tom Scott
Graphics by William Marler https://wmad.co.uk
Audio mix by Graham Haerther https://haerther.net/

I’m at https://tomscott.com
on Twitter at https://twitter.com/tomscott
on Facebook at https://facebook.com/tomscott
and on Instagram as tomscottgo

You may also like...

70 Responses

  1. spoilt milk says:

    Tom Scott: Have you ever wondered about why [obscure fact I’ve never wondered about]?

    Me: Well, I sure do now

  2. Xkyrie K1001 says:

    As a Conman, this feature caused massive losses to my business as i was unable to folder my plans

  3. Nick Kent says:

    I’m almost impressed that Tom didn’t use the word “legacy” even once in this video.

    Also, as always, great work.

  4. bousninate says:

    I remember 14 years old me trolling people on irc by having them type /con/con on mirc and crashing their computer

  5. épinards & caramel says:

    In French « con » means “moron”, so we just thought that Windows was a bit susceptible.

  6. TravisFabel says:

    “if you’re using a windows computer, try this” ok. dammit. hes right.

  7. TN Turnip says:

    “So why should I use Linux?”
    “You can name your file ‘con’.”

    • XxamorOo says:

      shut up and take my bootable usb

    • bettafish says:

      Ben Yarmis rm –help ;D

    • Zoltán Pósfai says:

      @bettafish Or: rm — –help

    • NaviSly02 says:

      @Ben Yarmis Or worse, someone could change the behaviour of your shell program by creating smart filenames such as –help, -rf , -rf / :’D
      In both cases, the optional/positional separator *–* comes in handy : *rm — –help*

    • Tara FitzGerald says:

      For most of the forbidden characters, you’d have to use an escape character to tell the system to interpret the character literally. Still a handful of grawlixes that’re forbidden though. 🙂

      You can most definitely use “con” though.
      [tara@tuxmonster ~]$ echo “see, it works!” > con
      [tara@tuxmonster ~]$ cat con
      see, it works!
      [tara@tuxmonster ~]$

  8. cutecubes plays says:

    bruh imagine working at the centre for computing history and tom scott calls you like “hey can i get an 8 minute long static camera shot of the room that I usually film in?”

  9. Eben Olivier says:

    My favorite story is that Microsoft specifically reintroduced a DOS bug in Windows 95 after having fixed it, just so that SimCity that relied on the bug would continue to work.

  10. No Fullname says:

    It’s amazing how much terminology in computers is actual still a reference to typewriters/teletypes.

  11. Andrew says:

    Everybody:

    *Sees title*
    Immediately attempts to create a folder named con
    *Doesn’t work*
    Watches video

  12. Netheryk says:

    Title : “Why You Can’t Name A File CON In Windows”
    Me : *Tries to name a file CON*
    Windows : *Invalid name*
    Me : *Surprised pikachu face*

    • henry stevens says:

      @xdevs23 Bourne again

    • arantala says:

      @Peter Vaňušanik Linux and other UNIX-like operating systems have a directory called /dev/ where these device files reside. CON would be /dev/tty, NUL would be /dev/null, COM0 to COM9 would be /dev/ttyS0..9.
      Since those operating systems were designed with directories in mind, they don’t need to reserve the device files universally. They reside in their own little nook, /dev/.
      The original FAT8 filesystem that the original MS-DOS used didn’t support directories. Because of this, as Tom says, due to backward compatibility, even in Windows 10, those device file names are universal.

    • arantala says:

      @Peter Vaňušanik Whoa. I just discovered something cool. You CAN make a directory or file called CON in Windows and you can access it.
      You can do it under the Linux Bash Shell. (Yes, Windows has official support for Bash nowadays, in case you didn’t know. Google it.)
      Just open the Bash shell and run the commands Peter here listed. It works. You can then browse to the folder in Explorer where those files are and plain as day, there is a directory called con. If you try to open it in Explorer however, you get an error saying the file is not accessible: “The handle is invalid.”
      So presumably this file or directory also couldn’t be deleted by Windows. This could prove problematic when trying to migrate data. If you try this out, you’ll want to delete the test files in Bash after you’re done.

    • Terris Leonis says:

      @Peter Vaňušanik because Linux sensibly keeps all those device files in /dev where they belong.

      Unless you mknod a new device file in your home directory or something silly, but Linux lets you do that because you’re in charge.

    • ᴀɴᴏɴʏᴍᴏᴜs says:

      i thought this was some weird joke(??) lmao

  13. thesuicidefox says:

    Tim: Why You Can’t Name A File CON In Windows
    Shatner: *in the distance* CON!!!!

  14. Tytus Sz-a says:

    “New stuff should also support the old stuff”

    -Apple has left the chat

    • Peter Maar says:

      Eh otherwise they’re gonna be stuck with it forever. they did it with PowerPC and survived so they know they can do it again… also it’s not hard to recompile and update especially if it’s on the App Store… which is also what they want :/ There are pros and cons to either approach but it could’ve been way worse …

    • byakka says:

      Electroblade 99% of programs are 32-bit? Yep, that’s a fact. Also, you are smart.

    • OytheGreat says:

      @Jasper Janssen “Twice as few features, twice as expensive” Great philosophy there.

    • Antonio Tejada says:

      Electroblade So… then what are we all running on our modern Macs and iOS devices? Nothing at all?

      Most programs can be easily recompiled to 64-bit, and that’s exactly what’s been done.

    • HECKproductions says:

      tom: “backwars compatibility means that you shouldnt have to buy a new printer just because you bought a new computer”

      apple: [laughs in planned obsolecense]

  15. Historical Context says:

    PROS: You can still use old programs
    CONS: N/A

  16. Frogbasher says:

    0:32 “On that note, did you know you can’t name a file CON in Windows 10?”
    Yes, I read the title 33 seconds before.

  17. megakiller999 says:

    “there are probably no windows 10 machines with parallel ports…”
    Me: sweats in IT for old lab tech

  18. Yosep says:

    “people like a mixture of novelty and familiarity” as a UX Designer, I cound’t agree more sir.

    • Antonio Tejada says:

      Yosep: but sadly, lots of UX designers don’t understand to not reinvent the wheel unnecessarily, and end up creating complexity or difficulty in use, simply for the sake of being new or “modern”. Witness the current flat design trend, which is horrible from a usability standpoint.

      (I’m a former UX designer.)

  19. Vova Batov says:

    Backwards compatibility: exists
    Apple: wat is dis

    • Xaius says:

      You want to borrow your friend’s charger? Hahaha, they’d better have a phone with a matching serial number then fool.

  20. Nick Moore says:

    Reasons to use Windows
    Pro: You can do spreadsheets.
    Con: Invalid filename.

Leave a Reply

Your email address will not be published. Required fields are marked *