[comp.os.msdos.misc] SWITCHAR in DOS 3.3

cwraight@lotus.com (Christopher L. Wraight) (08/20/90)

Back in MS-DOS 2.X, I used to be able to add the following command in my config.sys --

	"switchar = - "

The end result was that I could enter either "/" or "\" for pathname separators.  (This was a tip contained in the book entitled 
 _ DOS | UNIX systems, becoming a super user _ , written by Martin D. Seyer & William J. Mills).  This option no longer works for 
MS-ODS 3.3, etc., and I can't find it any of my MS-DOS documentation ( I don't have any development doc).

Does anyone know of a similar command/option in MS-ODS 3.X or higher?

thx,

chris

steveha@microsoft.UUCP (Steve Hastings) (08/22/90)

In article <1990Aug20.113913.6502@lotus.com> cwraight@lotus.com (Christopher L. Wraight) writes:
>Back in MS-DOS 2.X, I used to be able to add the following in my config.sys --
>
>	"switchar = - "
>
>The result was that I could enter either "/" or "\" for pathname separators.
>This option no longer works for MS-DOS 3.3, etc.

You are correct.  DOS 3.0 and above do not have this feature.


> and I can't find it any of my MS-DOS documentation

This was never documented in any Microsoft documentation.


>Does anyone know of a similar command/option in MS-DOS 3.X or higher?

There are two ways I know of to do what you want.

First of all, while the SWITCHAR option was removed from CONFIG.SYS in DOS
versions 3.x and above, the undocumented system interrupt that provides the
service is still around.  There are several utilities available that use
that undocumented interrupt to set the switch character as SWITCHAR=- used
to.  I have seen two public domain programs that do this, and the MKS
utilities contains a program to do this.

When I used MKS utilities I tried this.  The problem I found was that when
I set the switch char to '-' and the directory separator to '/', the
version of DOS I was using stopped recognizing '\' as a directory
separator.  (I believe I was using PC-DOS 3.20 at the time.)  Then,
whenever I ran an application that had overlays or data files with explicit
pathnames, the application would crash and burn with "File not found" error
messages.  The good thing about this approach was that applications that
prompted for paths automatically had their separators switched.

The second way to do what you want is to buy the PolyShell utilities
package.  It is a replacement shell for COMMAND.COM, and it has an option
to fix up a command line before it sends it to DOS for execution.  So you
type

cl -Zi /work/foo.c

and what DOS sees is

cl /Zi \work\foo.c

instead.  Note that this approach works even on programs that validate
their command line themselves, like Microsoft C 5.x CL.EXE.  It will also
never break overlayed programs.  But it will not work *inside* applications
that prompt for paths; you will still have to use '\' inside those.

I prefer the PolyShell approach; as they say, your mileage may vary.

You do have one other option -- get a 101-style keyboard exactly like an
IBM keyboard and train yourself to use it.  The Ctrl and Alt keys are in
different places than everyone is used to, but the backslash key is very
conveniently located just above the Enter key.  And you *can* learn to use
the Ctrl and Alt keys in their new locations.  Not much fun while you are
learning, though.
-- 
Steve "I don't speak for Microsoft" Hastings    ===^=== :::::
uunet!microsoft!steveha  steveha@microsoft.uucp    ` \\==|