Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!srhqla!demott!kdq From: kdq@demott.com (Kevin D. Quitt) Newsgroups: comp.os.msdos.misc Subject: Re: Getting rid of "syntax error" from .bat files - how to? Message-ID: <1990Dec5.195852.3010@demott.com> Date: 5 Dec 90 19:58:52 GMT References: <9467@pasteur.Berkeley.EDU> Reply-To: kdq@demott.COM (Kevin D. Quitt) Organization: DeMott Electronics Co., Van Nuys CA Lines: 24 In article <9467@pasteur.Berkeley.EDU> brand@cad.Berkeley.EDU (Graham Brand) writes: >I have written a batch file which accepts parameters from the command >line using the: > if %1==param1 >syntax. It works fine except that if I don't pass any parameters, I >get the above syntax error message. Is there any way to suppress this? try: if (%1)==(param1) or: if $%1==$param1 etc. >In addition, is there any way of passing a string, the first character >of which is a dash (-), as in -f? It doesn't seem to work with the >above test. Works just fine as above. -- _ Kevin D. Quitt demott!kdq kdq@demott.com DeMott Electronics Co. 14707 Keswick St. Van Nuys, CA 91405-1266 VOICE (818) 988-4975 FAX (818) 997-1190 MODEM (818) 997-4496 PEP last