When did Windows start accepting forward slash as a path separator?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Duncan Booth

    #16
    Re: When did Windows start accepting forward slash as a path separator?

    Grant Edwards <grante@visi.co m> wrote in
    news:slrnap5gfa .aol.grante@loc alhost.localdom ain:
    [color=blue][color=green]
    >> I _think_ (can't be sure...) that at a C-libraries level the switch
    >> occurred either between DOS 1.0 and 1.1, or at the time of release of
    >> 2.0.[/color]
    >
    > I don't think 1.0 had a hierarchical filesystem at all did it?[/color]

    That is correct, originally DOS like CP/M didn't have a concept of
    directories, all file access used file control blocks. When they added
    directories in Dos 2.0 they added new int21 calls which supported the
    directory paths and these have always accepted either forward or reversed
    slashes as path separators interchangeably .

    Dos 3.0 added an int21 call to canonicalize pathnames which included
    converting all forward slashes to backslashes.

    --
    Duncan Booth duncan@rcp.co.u k
    int month(char *p){return(1248 64/((p[0]+p[1]-p[2]&0x1f)+1)%12 )["\5\x8\3"
    "\6\7\xb\1\x9\x a\2\0\4"];} // Who said my code was obscure?

    Comment

    • Peter Hansen

      #17
      Re: When did Windows start accepting forward slash as a path separator?

      Andrew Dalke wrote:[color=blue]
      >
      > Bob Gailer:[color=green]
      > > Good question. Certainly later than:
      > >
      > > Microsoft Windows 2000 [Version 5.00.2195]
      > > (C) Copyright 1985-2000 Microsoft Corp.
      > >
      > > C:\>cd /samis
      > > The syntax of the command is incorrect.[/color]
      >
      > The shell is parsing the line and interprets the "/" as a
      > command-line flag, Try a relative path, like
      >
      > cd ./samis[/color]

      And of course, there's always:

      C:\>ver
      Windows 98 [Version 4.10.2222]

      C:\>cd ./temp
      Too many parameters - /TEMP

      C:\>cd ./temp"
      Too many parameters - /TEMP"

      C:\>cd "./temp"

      C:\>


      But I digress... *you* guys were talking about operating systems. ;-)

      -Peter

      Comment

      • Ronald Oussoren

        #18
        Re: When did Windows start accepting forward slash as a path separator?


        On 26 sep 2003, at 5:50, Jules Dubois wrote:[color=blue]
        >
        > The Windows kernels are the same. The internals of the operating
        > system
        > accept either.
        >[/color]
        That's not entirely true, in WinNT derivatives the backslash is the
        real seperator at the kernel level, the Win32 perform some conversion
        that allows forward slashes and recognizes special files like CON, PRN,
        et.al..

        To make live even more interesting, only unicode paths with backslashes
        as seperators can address all files (at least when I last looked at it
        about 2 years ago). When using unicodepaths you can use '\\?\' as a
        prefix on paths to turn off the conversion I mention above (see

        fileio/base/naming_a_file.a sp). The fun you can have on windows, I've
        managed to create files that cannot be removed :-)

        Ronald


        Comment

        • Stephen Horne

          #19
          Re: When did Windows start accepting forward slash as a path separator?

          On Fri, 26 Sep 2003 02:05:50 GMT, "Andrew Dalke"
          <adalke@mindspr ing.com> wrote:
          [color=blue]
          >Bob Gailer:[color=green]
          >> Good question. Certainly later than:
          >>
          >> Microsoft Windows 2000 [Version 5.00.2195]
          >> (C) Copyright 1985-2000 Microsoft Corp.
          >>
          >> C:\>cd /samis
          >> The syntax of the command is incorrect.[/color]
          >
          >The shell is parsing the line and interprets the "/" as a
          >command-line flag, Try a relative path, like
          >
          > cd ./samis[/color]

          Nope...

          F:\>cd ./dev

          F:\>cd .\dev

          F:\Dev>


          Notice how the forward slash version doesn't change directories, but
          the back slash version does. My guess is that it is being taken as...

          cd . /<unknown option>

          The big question being why the unknown option doesn't get an error
          message, as it normally does.


          --
          Steve Horne

          steve at ninereeds dot fsnet dot co dot uk

          Comment

          • Robin Becker

            #20
            Re: When did Windows start accepting forward slash as a path separator?

            In article <b16e4ef7.03092 51550.724a57f@p osting.google.c om>, Stephen
            Ferg <steve@ferg.org > writes[color=blue]
            >I have a question that is not directly Python-related. But I thought
            >I'd ask the most erudite group that I know... :-)
            >
            >When did Windows start accepting the forward slash as a path separator
            >character?
            >
            >At one time, it was accepted as a truism that Windows (like MS-DOS)
            >was different from Unix because Windows used the backslash as the path
            >separator character, whereas Unix used the forward slash.
            >
            >But now, among a small group of cognoscenti, it is a truism that this
            >is a myth, and that Windows will allow you to use either the forward
            >or the backward slash as a pathname separator.
            >
            >I hypothesize that originally Windows accepted only the backslash, and
            >then at some time it changed to accept the forward slash as well.
            >Does anyone know when that change occurred? Was it with the
            >introduction of support for long filenames in NT and Win95?[/color]

            I seem to remember getting an early C compiler from M$ around 1983/5 and
            being pleasantly surprised that '/' was acceptable. So far as I know
            this has been true from the earliest days. I suspect it was because of
            all the unix C code that people wanted to work without effort.
            --
            Robin Becker

            Comment

            • Stephen Horne

              #21
              Re: When did Windows start accepting forward slash as a path separator?

              On Fri, 26 Sep 2003 14:44:30 +0200, Ronald Oussoren
              <oussoren@cistr on.nl> wrote:
              [color=blue]
              >The fun you can have on windows, I've
              >managed to create files that cannot be removed :-)[/color]

              I've had that one simply by saving a web page in IE. Seriously
              annoying.


              --
              Steve Horne

              steve at ninereeds dot fsnet dot co dot uk

              Comment

              • Stephen Horne

                #22
                Re: When did Windows start accepting forward slash as a path separator?

                On Fri, 26 Sep 2003 02:03:10 GMT, "Andrew Dalke"
                <adalke@mindspr ing.com> wrote:
                [color=blue]
                >Stephen Ferg:[/color]
                [color=blue][color=green]
                >> At one time, it was accepted as a truism that Windows (like MS-DOS)
                >> was different from Unix because Windows used the backslash as the path
                >> separator character, whereas Unix used the forward slash.[/color]
                >
                >It was? My copy of Norton's Guide to the IBM PC makes
                >the explicit statement that directories were directly influenced by
                >unix. I actually regard this as a point of similarity. The character
                >used is a minor issue.[/color]

                Directly influenced, yes - but as DOS 1 didn't have subdirectories but
                did have options marked with '/', the unix subdirectories couldn't be
                duplicated exactly in DOS 2. The character used *is* a minor issue,
                but it is still a difference - what Stephen Ferg wrote is, I believe,
                valid.

                Even if DOS was internally happy to accept '/' as a path separator,
                still the 'accepted as a truism' bit rings true to me - what is
                accepted as an obvious truth is not always actually true, and to most
                people users DOS was the command line and Windows was just a shell on
                top of DOS - the 'truism' was what people could see, not what was
                hidden away in the INT 21h calls that only programmers cared about.


                --
                Steve Horne

                steve at ninereeds dot fsnet dot co dot uk

                Comment

                • Bengt Richter

                  #23
                  Re: When did Windows start accepting forward slash as a path separator?

                  On Sat, 27 Sep 2003 09:47:47 +0100, Stephen Horne <$$$$$$$$$$$$$$ $$$@$$$$$$$$$$$ $$$$$$$$$.co.uk > wrote:
                  [color=blue]
                  >On Fri, 26 Sep 2003 14:44:30 +0200, Ronald Oussoren
                  ><oussoren@cist ron.nl> wrote:
                  >[color=green]
                  >>The fun you can have on windows, I've
                  >>managed to create files that cannot be removed :-)[/color]
                  >
                  >I've had that one simply by saving a web page in IE. Seriously
                  >annoying.
                  >[/color]
                  Do you mean windows exploder will not even delete it with right-click, delete?
                  Or doesn't it show up at all? (how do you know it exists? dos dir?)

                  Regards,
                  Bengt Richter

                  Comment

                  • Andrew Dalke

                    #24
                    Re: When did Windows start accepting forward slash as a path separator?

                    Stephen Feng:[color=blue][color=green][color=darkred]
                    > >> At one time, it was accepted as a truism that Windows (like MS-DOS)
                    > >> was different from Unix because Windows used the backslash as the path
                    > >> separator character, whereas Unix used the forward slash.[/color][/color][/color]

                    Me, arguing that the directory structure between DOS and its Windows
                    derivatives is a point of similarity, compared to the other differences.

                    Stephen Horne:[color=blue]
                    > Directly influenced, yes - but as DOS 1 didn't have subdirectories ...[/color]

                    Right. I said that as well ... Plus, Stephen's Feng's comparison
                    is predicated on comparing how directories are accessed, so it's
                    cheating to go back to when DOS didn't have directories. ;)
                    [color=blue]
                    > what is accepted as an obvious truth is not always actually true,[/color]

                    A truer word has rarely been said.

                    BTW, the similarity-but-not-the-same between DOS and unix
                    caused me problems when I started using unix. See, under DOS
                    there's this great utility called "unerase" which can be used to
                    recover files accidentally deleted. Only I would deliberately
                    delete a file in order to probe the system; eg, is this file really
                    used?

                    And I wanted to see if the script really used the C compiler....

                    Had to reinstall IRIX to fix that one.

                    Andrew
                    dalke@dalkescie ntific.com


                    Comment

                    • Cousin Stanley

                      #25
                      Re: When did Windows start accepting forward slash as a path separator?

                      >>The fun you can have on windows, I've[color=blue][color=green]
                      >>managed to create files that cannot be removed[/color]
                      >
                      >I've had that one simply by saving a web page in IE. Seriously
                      >annoying.
                      >[/color]
                      | Do you mean windows exploder will not even delete it with right-click, delete?
                      | Or doesn't it show up at all? (how do you know it exists? dos dir?)

                      Under Win98 they show up
                      AND can NOT be deleted from the Right-Click context menu ...

                      They can be deleted with no problem under DOS ....

                      The problem in Win98 for me came from saving web pages
                      with extra LONG file names ....

                      --
                      Cousin Stanley
                      Human Being
                      Phoenix, Arizona

                      Comment

                      • Stephen Horne

                        #26
                        Re: When did Windows start accepting forward slash as a path separator?

                        On 27 Sep 2003 17:20:44 GMT, bokr@oz.net (Bengt Richter) wrote:
                        [color=blue]
                        >On Sat, 27 Sep 2003 09:47:47 +0100, Stephen Horne <$$$$$$$$$$$$$$ $$$@$$$$$$$$$$$ $$$$$$$$$.co.uk > wrote:
                        >[color=green]
                        >>On Fri, 26 Sep 2003 14:44:30 +0200, Ronald Oussoren
                        >><oussoren@cis tron.nl> wrote:
                        >>[color=darkred]
                        >>>The fun you can have on windows, I've
                        >>>managed to create files that cannot be removed :-)[/color]
                        >>
                        >>I've had that one simply by saving a web page in IE. Seriously
                        >>annoying.
                        >>[/color]
                        >Do you mean windows exploder will not even delete it with right-click, delete?
                        >Or doesn't it show up at all? (how do you know it exists? dos dir?)[/color]

                        There was no way I could find to delete it - not even writing a C++
                        program directly calling the DeleteFile API call.

                        I don't remember exact details - not even for sure whether it was
                        Win98 or Win2000 (it was too long ago for WinXP). I do remember that
                        the non-deletable file was in a deeply nested set of pointless folders
                        created by saving that web site.

                        Basically, it ended up sitting on my machine annoying me for ages -
                        I'm not sure if a new machine or a reinstall put an end to it (it was
                        my work machine, which tends to get fewer reinstalls).


                        --
                        Steve Horne

                        steve at ninereeds dot fsnet dot co dot uk

                        Comment

                        • Grant Edwards

                          #27
                          Re: When did Windows start accepting forward slash as a path

                          In article <YAZd/ks/Kjpc089yn@the-wire.com>, Mel Wilson wrote:
                          [color=blue][color=green][color=darkred]
                          >>>I have a question that is not directly Python-related. But I thought
                          >>>I'd ask the most erudite group that I know... :-)
                          >>>When did Windows start accepting the forward slash as a path separator
                          >>>character?[/color][/color][/color]
                          [color=blue]
                          > Internally, the routines in the API have accepted '/' as a path
                          > separator for a long, long time. It's the command-line
                          > processors that kick up a fuss.[/color]

                          And that could always be fixed by running a real shell a-la MKS,
                          Cygwin, etc.

                          --
                          Grant Edwards grante Yow! Hello. I know
                          at the divorce rate among
                          visi.com unmarried Catholic Alaskan
                          females!!

                          Comment

                          • JanC

                            #28
                            Re: When did Windows start accepting forward slash as a path separator?

                            Stephen Horne <$$$$$$$$$$$$$$ $$$@$$$$$$$$$$$ $$$$$$$$$.co.uk > schreef:
                            [color=blue]
                            > I do remember that the non-deletable file was in a deeply nested set
                            > of pointless folders created by saving that web site.[/color]

                            IIRC that is or was a bug on (some) Windows versions: the path+filename you
                            have to pass to the Delete File API function could be too long for the
                            reserved string buffer length (256 bytes), or something like that...

                            --
                            JanC

                            "Be strict when sending and tolerant when receiving."
                            RFC 1958 - Architectural Principles of the Internet - section 3.9

                            Comment

                            • Christos TZOTZIOY Georgiou

                              #29
                              Re: When did Windows start accepting forward slash as a path separator?

                              On 27 Sep 2003 17:20:44 GMT, rumours say that bokr@oz.net (Bengt
                              Richter) might have written:
                              [color=blue]
                              >Do you mean windows exploder will not even delete it with right-click, delete?
                              >Or doesn't it show up at all? (how do you know it exists? dos dir?)[/color]

                              I have 110MB (or so they seem) worth of files (2893 files) in my W2k SP4
                              laptop's c:\recycler\npr otect folder that can't be accessed or deleted.
                              Norton Protect is long uninstalled, but operating on the files gives
                              (example):

                              C:\RECYCLER\NPR OTECT\00041753.
                              The system cannot find the file specified.

                              The disk shows as healthy in Disk Manager, and scandisk or
                              what's-its-name runs successfully. Go figure. Ils sont fous ces
                              Redmontains! (index finger running wild circles)
                              --
                              TZOTZIOY, I speak England very best,
                              Microsoft Security Alert: the Matrix began as open source.

                              Comment

                              • Christos TZOTZIOY Georgiou

                                #30
                                Re: When did Windows start accepting forward slash as a path separator?

                                On Sat, 27 Sep 2003 17:22:41 GMT, rumours say that "Andrew Dalke"
                                <adalke@mindspr ing.com> might have written:
                                [color=blue]
                                >BTW, the similarity-but-not-the-same between DOS and unix
                                >caused me problems when I started using unix. See, under DOS
                                >there's this great utility called "unerase" which can be used to
                                >recover files accidentally deleted. Only I would deliberately
                                >delete a file in order to probe the system; eg, is this file really
                                >used?[/color]

                                Safe wisdom: mv (move, ren for old DOS) would be better, right?
                                [color=blue]
                                >And I wanted to see if the script really used the C compiler....
                                >
                                >Had to reinstall IRIX to fix that one.[/color]

                                If 'inst same' wasn't enough, then that should have been a really old
                                version of Irix... :(
                                --
                                TZOTZIOY, I speak England very best,
                                Microsoft Security Alert: the Matrix began as open source.

                                Comment

                                Working...