Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site calma.UUCP Path: utzoo!linus!decvax!decwrl!sun!calma!story From: story@calma.UUCP (Glen Story) Newsgroups: net.micro.pc,net.micro Subject: Re: null as variable in batch file Message-ID: <152@calma.UUCP> Date: Wed, 12-Feb-86 01:02:07 EST Article-I.D.: calma.152 Posted: Wed Feb 12 01:02:07 1986 Date-Received: Thu, 13-Feb-86 17:19:15 EST References: <533@whuts.UUCP> Reply-To: story@calma.UUCP (Glenn Story) Distribution: net Organization: GE/Calma Co., R&D Systems Engineering, Milpitas, CA Lines: 11 Xref: linus net.micro.pc:6709 net.micro:12579 In article <533@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=='':goto xx' as well as >==' ' The following will solve your problem: if x%1 == x goto ...