Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi) Newsgroups: comp.os.msdos.misc Subject: Re: Getting rid of "syntax error" from .bat files - how to? Message-ID: <1990Dec6.065045.12596@uwasa.fi> Date: 6 Dec 90 06:50:45 GMT References: <9467@pasteur.Berkeley.EDU> Organization: University of Vaasa Lines: 18 In article <9467@pasteur.Berkeley.EDU> brand@cad.Berkeley.EDU.UUCP (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 : Simple. Wrong format. Use if "%1"=="param1" ... If you want to learn batch programming take a look at some batch packages. I'll naturally recomend to my own, /pc/ts/tsbat22.arc available by anonymous ftp from uwasa.fi archives. Contains a wealth of batch lore and tricks. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun