🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2956

Re: Passing delimiters to a batch file

#2956
From: Scott Scheiman
Date: Wed, 07 Nov 1990 23:20
37 lines
2486 bytes
In article <60564@bbn.BBN.COM> sher@BBN.COM (Lawrence D. Sher) writes:
>I want to be able to call a batch file with arguments that contain
>commas.  This over-ambitious goal has led me to discover that DOS uses
>both spaces and commas (and any contiguous collection thereof) as
>delimiters between arguments.

I worked up a patch to COMMAND.COM a number of years ago so that it
doesn't treat comma like a space.  Of course, such an approach treats
all commas this way, not just going to batch parameters, and it isn't
portable.

(I needed this ability to pass commas because I wanted to call MAKE from
a batch file, passing its parameters into the batch file, and MAKE
requires commas in some parameters.  Shame on the DOS design.)

Someone wanted this a while back, so I made a posting like this one saying I
would make my patch available.  I got about 6 mail requests for it, so I
decided to post it.  I have no idea how many people have since tried it.
I did have some email interaction with someone who found an obscure
side-effect that he didn't like (for which I had no workaround).  I
suspect I still have records of our email about that problem, but right
now my memory fails.

My patch was for DOS version 3.1.  However, I describe it in context
(use DEBUG to find code that looks right and put the patch there) so
it's likely it can be applied to many DOS versions, at least the 3.x
versions.  Who knows if the 4.x versions have diverged too far...?

OS/2 command interpreter has implemented an escape character which might
work in your case -- but who has OS/2 (except me)?
--
Special Guest .Signature:
    "Irresponsibility is not a sickness--it's an art!"    -- R. Steele

"Ribbit!"         Scott Scheiman   (408) 562-5572        Ungermann-Bass, Inc.
  ` /\/@\/@\/\           scott@ubvax.UB.Com          2560 Mission College Blvd.
   _\ \ -  / /_         ...uunet!ubvax!scott            Santa Clara, CA 95054
Technical Details
Message-ID: <34981@ubvax.UB.Com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!ubvax!scott
References: <60564@bbn.BBN.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!ubvax!scott
From: scott@ubvax.UB.Com (Scott Scheiman)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Passing delimiters to a batch file
Summary: Patch COMMAND.COM
Keywords: batch
Message-ID: <34981@ubvax.UB.Com>
Date: 7 Nov 90 23:20:56 GMT
References: <60564@bbn.BBN.COM>
Reply-To: scott@ubvax.ub.com (Scott Scheiman)
Distribution: na
Organization: Ungermann-Bass, Inc.
Lines: 37