[comp.unix.questions] Dos slash experience

leisner.wbst139@xerox.com (02/24/91)

I was an extensive user of Ms-Dos and tried to make my Ms-Dos machines look
like Unix machines (as much as possible).

The DOS operating system takes forward or backward slashes as path delimiters.

There's a switchar command to configure command.com (or DOS tools or whoever
looks at this).

Some applications takes only backward slashes, some take either one.

I also ran join on a drive to get /a instead of a: (no vendors seem to be able
to handle this with their install scripts or programs).

marty
(Knowledge is useful in the Information Age)
(I hate slow, non-intuitive non-creative computer systems)
ARPA:	leisner.wbst139@xerox.com
NS:  leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner

dwhite@dsys.ncsl.nist.gov (Doug White) (02/25/91)

The easist way to keep some sanity when working in both the unix & dos worlds
is to take advantage of the dos command "switch". dos defaults to using the
backslash "\" for path name delimitation and the slash "/" as the switch or
option delimiter (instead of the hyphen "-" that we know and love).
the command "switch -" in dos will let you use the hyphen for command line options, and the regular slash for path names in most cases. sometimes the
dos applications themselves are assuming that the switch chracter will be 
a slash and bomb. I get around this by putting a directory /localbat first
in my dos path, where the contents are dos batch files that switch the switch
automatically and call the application.
for example: to start wordperfect (which bombs with the wrong switch)
create "wp.bat" in /localbat with (roughly) these contents-
	switch /
	wp.exe %1 %2 %3 %4
	switch -

if /localbat is first in the path (or ahead of the directory which contains
wp.exe), this batch file will set the switch to the (argh) default, call the
executable and pass command line options, then return the switch back to a
hyphen.

check out "switch" , "echo" , and parameter passing in the dos manual.
(oooh, there's an oxymoron!)

------------------------------------------------------------------------------
 Douglas White                                
 National Institute of Standards & Technology 
 Bldg. 225, Rm A216         
 Gaithersburg, MD 20899        ----------------- DISCLAIMER ------------------
 dwhite@dsys.ncsl.nist.gov     :) "The opinions contained herein are not 
 Voice: (301) 975-2182         :) neccessarily NIST's, not neccessarily mine, 
 FAX: (301) 590-0932           :) and probably not neccessary."