Archived from groups: microsoft.public.windowsxp.general (More info?)
Hello, All! please find here below my batch file.
(isdate d:\batch\temp.txt NOT EQUAL TODAY
if errorlevel 1 set true_=No
if errorlevel 0 set true_=Yes)
Even when the isdate command returns an errorlevel 1 the variable true_ sets
Yes. Somebody please point out the error in the batch file. Thanks in
advance.
With best regards, Brother Brock. E-mail: Nobodyknows@unknown.com
Archived from groups: microsoft.public.windowsxp.general (More info?)
What does "isdate" do ?
Mik
"Brother Brock" <Nobodyknows@unknown.com> wrote in message
newsR5ZgTPpFHA.3996@TK2MSFTNGP12.phx.gbl...
> Hello, All! please find here below my batch file.
> (isdate d:\batch\temp.txt NOT EQUAL TODAY
> if errorlevel 1 set true_=No
> if errorlevel 0 set true_=Yes)
>
> Even when the isdate command returns an errorlevel 1 the variable
true_ sets
> Yes. Somebody please point out the error in the batch file. Thanks
in
> advance.
>
> With best regards, Brother Brock. E-mail: Nobodyknows@unknown.com
>
>
In newsN7dqbQpFHA.3036@TK2MSFTNGP14.phx.gbl,
Mik <Mik@No-spam-mail.com> hunted and pecked:
> What does "isdate" do ?
>
> Mik
>
> "Brother Brock" <Nobodyknows@unknown.com> wrote in message
> newsR5ZgTPpFHA.3996@TK2MSFTNGP12.phx.gbl...
>> Hello, All! please find here below my batch file.
>> (isdate d:\batch\temp.txt NOT EQUAL TODAY
>> if errorlevel 1 set true_=No
>> if errorlevel 0 set true_=Yes)
>>
>> Even when the isdate command returns an errorlevel 1 the variable true_
>> sets Yes. Somebody please point out the error in the batch file. Thanks
>> in advance.
>>
>> With best regards, Brother Brock. E-mail: Nobodyknows@unknown.com
Archived from groups: microsoft.public.windowsxp.general (More info?)
"Brother Brock" <Nobodyknows@unknown.com> wrote:
>Hello, All! please find here below my batch file.
>(isdate d:\batch\temp.txt NOT EQUAL TODAY
>if errorlevel 1 set true_=No
>if errorlevel 0 set true_=Yes)
>
>Even when the isdate command returns an errorlevel 1 the variable true_ sets
>Yes. Somebody please point out the error in the batch file. Thanks in
>advance.
>
>With best regards, Brother Brock. E-mail: Nobodyknows@unknown.com
>
errorlevel works on an "equal to or greater than" basis so you must
use a goto command to skip past the tests for lower values.
Try this:
if errorlevel 1 goto level1
(the preceding line will be processed if errorlevel is 1 or higher)
set true_=Yes
goto finish
(the above 2 lines will be processed only if errorlevel is less than
1)
:level1
set true_=No
:finish
(balance of batch file commands)
Good luck
Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.