🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc
Article #43701

Re: / as a dir delimiter

#43701
From: Tom Almy
Date: Thu, 08 Mar 1990 16:42
41 lines
2393 bytes
In article <16559@orstcs.CS.ORST.EDU> larsen@mist.CS.ORST.EDU (Scott Larsen) writes:
>Does anyone know if you can change the default directory delimiter from
>a back slash to a forward slash?  I am a unix user and find MS-DOS's
>use of a backslash rather annoying, as well as disasterous in c programs.
>
>Any ideas?

This is actually only a problem with the command interpreter (COMMAND.COM)
as DOS file functions will accept either slash (thus, don't worry in your
C programs).

The problem is actually the "switch" character, which is "/" in DOS and
by convention "-" in UNIX. Programs including COMMAND.COM assume that
the switch character indicates a switch rather than a file, disallowing
use of the forward slash unless the switch character is changed.

Why these strange non-UNIX conventions? Because MS-DOS is following a
lineage *OLDER* than UNIX. The use of "/" as the switch character is a
holdover from CP/M, which adopted it from DEC proprietary operating systems.
(Aside: be glad you don't use the 'PIP' command to copy files!)
When DOS 2.0 came around and it was necessary to have a hierarchical, UNIX-like
file system they had to pick another character. At least someone at MS had
the sense to allow DOS to accept either slash.

In DOS 2.x you could put a statement in CONFIG.SYS to set the switch character.
   An undocumented system call could be used to fetch/set the switch character.
In DOS 3.x you had to use the system call.
In DOS 4.x the system call has been disabled.

Also, a seemingly increasing percentage of programs will not work when the
switch character has been changed.

I hope you see the handwriting on the wall.

Perhaps the best bet is to change the filename separator character in UNIX
to match DOS, rather than changing DOS to match UNIX.  Or maybe just accept
that these are two different operating systems.

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply
Technical Details
Message-ID: <7043@tekgvs.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma
References: <16559@orstcs.CS.ORST.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma
From: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Newsgroups: comp.sys.ibm.pc
Subject: Re: / as a dir delimiter
Message-ID: <7043@tekgvs.LABS.TEK.COM>
Date: 8 Mar 90 16:42:17 GMT
References: <16559@orstcs.CS.ORST.EDU>
Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 41