[comp.sys.ibm.pc.programmer] Passing delimiters to a batch file

sher@bbn.com (Lawrence D. Sher) (11/03/90)

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.
Thus, if test.bat is 
     echo %1
     echo %2
then at the DOS prompt
     test 3,4 (or test 3 4  or test 3,   4)
produces
     3
     4
That means that commas cannot be passed in as part of the arguments
unless they are specially sheltered or "escaped" somehow.  What I'd like
to do is have
     test "foo(3,4)" 5
echo
     foo(3,4)
     5
but of course it echoes
     "foo(3
     4)"
I can't find any way of doing this.  Is there any way?
             .---------------------------------------------------------------- 
            /Internet email: sher@bbn.com
Larry Sher <        US Mail: BBN, MS 6/5A, 10 Moulton St., Cambridge, MA 02138
            \     Telephone: (617) 873 3426    FAX: (617) 873 3776
	     `----------------------------------------------------------------