Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!talcott!panda!genrad!decvax!ittatc!dcdwest!sdcsvax!noscvax!ogasawar From: ogasawar@noscvax.UUCP (Todd H. Ogasawara) Newsgroups: net.micro,net.micro.pc Subject: Re: null as variable in batch file Message-ID: <221@noscvax.UUCP> Date: Fri, 21-Feb-86 01:33:12 EST Article-I.D.: noscvax.221 Posted: Fri Feb 21 01:33:12 1986 Date-Received: Mon, 24-Feb-86 06:07:29 EST References: <22@datagen.UUCP> Reply-To: ogasawar@cod.UUCP (Todd H. Ogasawara) Organization: Naval Ocean Systems Center, San Diego Lines: 17 Xref: linus net.micro:12666 net.micro.pc:6878 In article <22@datagen.UUCP> boykin@datagen.UUCP writes: > >>foo %1 --how do I detect case where %1 is omitted, thus avoiding >> an error? I've tried: This works pretty good for me: IF %0%1==%0 GOTO ... %0 always equals itself if there is no arg following the invocation of the batch command name itself. Todd Ogasawara, Computer Sciences Corp. NOSC-Hawaii Laboratories UUCPmail: {akgua,allegra,decvax,ihnp4,ucbvax}!sdcsvax!noscvax!ogasawar MILNET: OGASAWAR@NOSC