Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site dataioDataio.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!tektronix!uw-beaver!uw-june!entropy!dataio!bright From: bright@dataioDataio.UUCP (Walter Bright) Newsgroups: net.micro.pc Subject: Re: null as variable in batch file Message-ID: <912@dataioDataio.UUCP> Date: Fri, 14-Feb-86 13:13:36 EST Article-I.D.: dataioDa.912 Posted: Fri Feb 14 13:13:36 1986 Date-Received: Mon, 17-Feb-86 05:57:07 EST References: <534@whuts.UUCP> Reply-To: bright@dataio.UUCP (Walter Bright Distribution: net Organization: Data I/O Corp., Redmond WA Lines: 14 In article <534@whuts.UUCP> 2212msr@whuts.UUCP (ROBIN) writes: >Does anyone know how to detect a null as variable input in a batch file? >Specifically: > >foo %1 --how do I detect case where %1 is omitted, thus avoiding > an error? I've tried: > if %1=='' > if %1==' ' > if %1== > all to no avail. Any help or pointers would be appreciated. Try this: if %1a == a