Dos slash experience

Doug White dwhite at dsys.ncsl.nist.gov
Tue Feb 26 01:15:44 AEST 1991


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 at 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."



More information about the Comp.unix.questions mailing list