Announcement

Collapse
No announcement yet.

Why cant I make a Con?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why cant I make a Con?

    I am running Windows XP sp2, why cant I make a file on my desktop called con.*

    Whether it is html or txt, it always says that file is already there, what is the deal?


  • #2
    Originally posted by rBg
    I am running Windows XP sp2, why cant I make a file on my desktop called con.*

    Whether it is html or txt, it always says that file is already there, what is the deal?
    Google is your friend. Try a google search for restricted characters for filenames in NTFS
    And you get this page which explains Filename Namespaces for various filesystems as the first hit.

    The "*" character is restricted by many Filesystems/OS as a wildcard and invalid for use as a filename.

    Is this the question you were asking?

    Comment


    • #3
      Originally posted by TheCotMan
      Is this the question you were asking?
      If that is not what you were asking, perhaps this is what you were asking about this other windows issue...


      After finding an XP machine, I tried to download a con.txt file, and Windowx XP gave me this error:
      Originally posted by Windows-XP-Error
      con.txt
      This file is a reserved device name.
      Please choose another name.
      So, if you go to google and perform a search for con "reserved device name" you get the first hit called "Naming a File [Base]" which may be an answer to your question.

      Google is really fun! It should be your first stop.

      [Edit: content added below here:]

      Now for some background. "con" is from the old dos days for "console"

      The *NIX equiv for:
      $ cat > /tmp/file

      Might be:
      c:> type con > \tmp\file

      Then you can escape with the native EOF terminator like control-d or have some success with a control-c

      Both would permit you to create a file named "file" in a "tmp" dir and have the contents you enter from the CONsole appear in the file, one line at a time. Without any editor on an old dos box, this was one way you could create batch scripts.

      [More added content below here:]

      I also seem to recall doing things like this:
      C:> type con > COM1
      to send to a serial port after a MODE had been called on the port to set speed, but my mind could be hazy here.
      Last edited by TheCotMan; July 10, 2004, 16:57. Reason: added CONtent (heh)

      Comment


      • #4
        Small Nit

        Originally posted by TheCotMan
        Then you can escape with the native EOF terminator like control-d
        I'm not saying you are incorrect, but I thought I would clarify that the EOF terminator in DOS is Control-Z.

        Comment


        • #5
          Originally posted by Voltage Spike
          I'm not saying you are incorrect, but I thought I would clarify that the EOF terminator in DOS is Control-Z.
          Naw, go for it. Say that I am incorrect. :-)
          (Because that is what I was in my exact statement... incorrect.)

          Thanks for the correction. Yes, for DOS you could use:
          c:> type con > \tmp\file
          a line of text (press return)
          ^Z (press return)
          and then you would have a file with your lines in it, but an editor like EDIT.COM would not show a ^Z in the file.

          This is the right way to do things. (Proper EOF)

          The control-c method does work in many cases, but is not really the correct way to do it for DOS or many *NIX shells.

          See? Nothing to be afraid of. If you correct me and you have the right answer, the readers benefit. :-)

          Comment


          • #6
            Don't Worry About Me

            Originally posted by TheCotMan
            Naw, go for it. Say that I am incorrect. :-)
            (Because that is what I was in my exact statement... incorrect.)
            You don't have to worry about me being timid. :) I held back simply because of your phrasing: "EOF terminator like control-d". Technically, you weren't wrong: Control-D is an EOF character ... just not the right one in this case.

            As with other computer people, I like to be as accurate and precise in my wording as possible. :D

            Thanks for the push, though.

            Comment

            Working...
            X