Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!ukc!rde From: rde@ukc.ac.uk (R.D.Eager) Newsgroups: net.micro.pc,net.micro Subject: Re: null as variable in batcg fileh file Message-ID: <754@eagle.ukc.ac.uk> Date: Wed, 12-Feb-86 04:16:43 EST Article-I.D.: eagle.754 Posted: Wed Feb 12 04:16:43 1986 Date-Received: Fri, 14-Feb-86 06:24:02 EST References: <533@whuts.UUCP> Reply-To: rde@ukc.UUCP (R.D.Eager) Distribution: net Organization: U of Kent at Canterbury, Canterbury, UK Lines: 22 Xref: linus net.micro.pc:6732 net.micro:12591 In article <533@whuts.UUCP> 2212msr@whuts.UUCP 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 >==' ' I remember a way to do this from my version 6 days (ah, when life was simple..) It works on MS-DOS 2.11 anyway! if %1x == x ...... -- Bob Eager rde@ukc.UUCP rde@ukc ...!mcvax!ukc!rde Phone: +44 227 66822 ext 7589