an you create a folder called “con“ in Windows? - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: an you create a folder called “con“ in Windows?

  1. #11
    Junior Member
    Join Date
    Oct 2005
    Posts
    15
    What if you were to mount the FAT filesystem in linux and mkdir con, then boot into windows What would that do?
    Compiling all the stuff for OS X...

  2. #12
    Leftie Linux Lover the_JinX's Avatar
    Join Date
    Nov 2001
    Location
    Beverwijk Netherlands
    Posts
    2,535
    I don't know.. You should try, realy..

    But I think.. Atleast in in the NT family (Windows2000/XP) it'll do something like MrBabis's test did..
    In windows you'll see a folder with a name like CSHOFG~F
    But that's an educated guess, nothing more..
    ASCII stupid question, get a stupid ANSI.
    When in Russia, pet a PETSCII.

    Get your ass over to SLAYRadio the best station for C64 Remixes !

  3. #13
    Super Moderator: GMT Zone nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,192
    I vaguely remember this from a long time ago, but cannot recall the context

    If you really want to use these reserved names you have to add something such as con1 or conA. What I am saying is that the reservation is specific not generic.

    So, if you are importing a file from another OS you have to write a line of code to change it. We decided on the suffix method for consistency reasons. I really cannot remember but I think our file was coming from an AS/400 or a 3090 mainframe. I know it took me a little while to figure out what was going wrong
    If you cannot do someone any good: don't do them any harm....
    As long as you did this to one of these, the least of my little ones............you did it unto Me.
    What profiteth a man if he gains the entire World at the expense of his immortal soul?

  4. #14
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    What if you were to mount the FAT filesystem in linux and mkdir con, then boot into windows What would that do?
    Most likely, the directory would exist, but when you name it from
    the dos command line you get unexpected results, since dos
    treats con as the console, instead of a file or directory.

    I don't know what explorer would do. They may eventually phase this
    behavior out. It's obsolete.
    I came in to the world with nothing. I still have most of it.

  5. #15
    Senior Member
    Join Date
    Aug 2003
    Posts
    185
    dear anban,
    yes , I can create a folder named "con"
    ==> mkdir "con\ "
    mkdir con\o
    cd con\o
    ----
    but it's old fxp **** , isn't it?
    Industry Kills Music.

  6. #16
    Senior Member IKnowNot's Avatar
    Join Date
    Jan 2003
    Posts
    792
    What if you were to mount the FAT filesystem in linux and mkdir con, then boot into windows What would that do?
    Ok, why not.

    Booted to Fc3, mounted a FAT32 win 98 disk.

    Attempted to create a directory named con, it would not let me
    “mkdir: cannot create directory `/mnt/windows/con': Invalid argument”

    so, did the same thing except made directory convent, no problems.



    Then, accessed a samba server from linux, made directory con then accessed the samba shares from XP-pro-sp2, no problems, no changes, accessed .exe files without problems. Through ME, ( on the same network, ) no problems, no alterations, IBID.

    And yes. could not create a con directory directly in XP-Pro-Sp2 ( NTFS ) nor ME ( FAT32 ).

    Nor could they be created on the Samba server from those OS's.

    Interesting.
    " And maddest of all, to see life as it is and not as it should be" --Miguel Cervantes

  7. #17
    Senior Member
    Join Date
    Nov 2001
    Posts
    4,786
    ah the good ol days 'con\con'. you could make an http page on your computer with a file:// link to a box with a shared directory running 98...add \con\con to the end, click the link and bye bye 98 boxen. sniff, sniff. they just dont make'em like that anymore.
    Bukhari:V3B48N826 “The Prophet said, ‘Isn’t the witness of a woman equal to half of that of a man?’ The women said, ‘Yes.’ He said, ‘This is because of the deficiency of a woman’s mind.’”

  8. #18
    Junior Member
    Join Date
    Oct 2005
    Posts
    1
    It’s true that we can not create a folder name “con”.

    It is true even if try to make a file name “con”

    I think it is because “con” is used as command modifier and it can be used to create text file from DOS shell without using any text editor. It is a command line editor.

    If we have a file or folder “con” such command will not be valid and hence DOS shell returns error

    I don’t know about Bill Gates or Microsoft but this is my observation and I strongly feel this is the reason.

  9. #19
    Frustrated Mad Scientist
    Join Date
    Dec 2004
    Posts
    1,152
    chipsns, try to read some of the answers before you post.

    It's been answered in about 4 different ways already including links to the MS documents.

  10. #20
    Senior Member
    Join Date
    Mar 2003
    Posts
    372
    well according to the snippets provided here MS says the following:

    # Several special file names are reserved by the system and cannot be used for files or folders:
    # CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL

    Now I know for a /fact/ that you can create directories named AUX COM1 COM2 etc on a win2k box using POSIX. I have seen it done, and I have had to remove them from a compromised box in the past. So that would mean the same technique can be used to create a CON dir too.

    If I have time later today I'll tag one of our internal test boxes and create a CON dir using the methods that most taggers use.


    *EDIT*

    Followed a link to this thread from here and responded before I noticed the date of last response. Sorry, but my offer still stands if I have time.

    Give a man a match and he will be warm for a while, light him on fire and he will be warm for the rest of his life.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides