Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!ihlpe!psfales From: psfales@ihlpe.ATT.COM (Pete Fales) Newsgroups: comp.sys.ibm.pc,comp.sys.att Subject: Re: Anyone know how to discover the DOS switch character? Message-ID: <2283@ihlpe.ATT.COM> Date: Fri, 13-Nov-87 09:48:14 EST Article-I.D.: ihlpe.2283 Posted: Fri Nov 13 09:48:14 1987 Date-Received: Sun, 15-Nov-87 17:54:34 EST References: <2678@ihlpf.ATT.COM> <2257@ihuxy.ATT.COM> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 21 Keywords: DOS, IBMPC, PC6300, switch, assembler Xref: mnetor comp.sys.ibm.pc:10169 comp.sys.att:1759 In article <2257@ihuxy.ATT.COM>, vg55611@ihuxy.ATT.COM (gopal) writes: > In article <2678@ihlpf.ATT.COM>, warren@ihlpf.ATT.COM (Montgomery) writes: > > I have tried without much success to find a way of discovering from > > a program what the current DOS switch character is. I am working > > with a C compiler and assembler that have no MS-DOS library support > > But, why read the switchar at all ? Just replace all occurrences of '/' > with '\' in the arg string (or the string of concern) and then the user of > your program can use either. This is what I do with programs I write. I'll speak for Warren (hope that's OK) since I have run into this problem before. Many programs allow the user to invoke a COMMAND.COM "subshell" to execute DOS commands. They do this by internally executing COMMAND.COM /C which works fine unless you have changed the switch character. I am fond enough of '-' as my switch char that I have gone into several programs with DEBUG to change the /C to -C. -- Peter Fales UUCP: ...ihnp4!ihlpe!psfales work: (312) 979-7784 AT&T Information Systems, IW 1Z-243 1100 E. Warrenville Rd., IL 60566