Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!maverick.ksu.ksu.edu!hoss!hoss.unl.edu!ho From: ho@hoss.unl.edu (Tiny Bubbles...) Newsgroups: comp.os.msdos.misc Subject: Re: switchar anyone? Message-ID: <1990Aug30.150611.25975@hoss.unl.edu> Date: 30 Aug 90 15:06:11 GMT References: <3388@ecs.soton.ac.uk> Sender: news@hoss.unl.edu (Network News Administer) Distribution: comp Organization: University of Nebraska, Computing Resource Center Lines: 36 In <3388@ecs.soton.ac.uk> mrd@ecs.soton.ac.uk (Mark Dobie) writes: >For instance, I can say 'dir /bin/foo' or 'dir \bin\foo' or even >'dir \bin/foo', but if I try to execute it, ie '/bin/foo' I get an >EXEC error. Is this a problem with command.com? >Also, if I start another command.com (within the one I set the switchar >in), the prompt shows up with forward slashes (UNIX style). ANy idea >how I can make the top level command.com do this? The switchar() call is not supported in DOS 3.x, I don't think. It's still there as a DOS call, but IBM and Microsoft "expect" you not to use it. The top-level COMMAND.COM, after discovering that it is in fact top-level, makes the call to set switchar to '/' -- and then ASSUMES that it will remain this way, without further checking. That's why second-level COMMAND will get the forward slash at the prompt, but the top-level won't. You can't make the top-level command start its prompt with a slash unless you reach into COMMAND and patch the call. (It's pretty simple -- just search for the MOV AH, ## -- whatever the call is, I forget -- and the INT call.) Also, if you have a complicated directory tree (like, more than one level off of root), you will NEVER get the prompts to look right. That's because the internal directory tables in DOS always use '\' as the separator before subdirectories, regardless of subdirectory. So you get nonsensical prompts like "C:/EAT\MY\SHORTS>" and, if you're not careful, programs can be tripped up very easily by this -- either that you write or that other vendors have written. I haven't tried anything like that lately, so I can't say for sure. -- --- ... Michael Ho, University of Nebraska Internet: ho@hoss.unl.edu