Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
If errorlevel goto label ??
Name: wonderingdude Date: April 9, 2009 at 16:55:42 Pacific OS: Windows Vista Subcategory: Batch
Comment:
Hi. I have a question, What is wrong with this script?
echo off :start choice /c yn if errorlevel 1 goto :label1 if errorlevel 2 goto :label2 goto :start :label1 echo you chose yes. pause >nul exit :label2 echo you chose no. pause >nul exit
I cant get it to work! Please tell me what im doing wrong. And the easiest way to fix it.
Summary: If I put the :end label inside the DO loop(which I need) I get a syntax error, but If I place it outside the loop it runs as expected... Any Ideas? SETLocal EnableDelayedExpansion FOR /f "tokens=* del...
Summary: I am trying to make a batch file to run a different set of commands depending on a the location of the office they're in. I'd like to have the user tell the system where they are and then have the sys...