Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Multiple commands in if statement
Name: suitto Date: March 2, 2009 at 17:38:17 Pacific OS: Windows XP Subcategory: Batch
Comment:
Hi, Is it possible to have 2 or more commands in the "do something" portion of the if statement? The if statement goes
if (condition) command
Is it possible to have it like
if (condition) (execute command1 follow by command2)
e.g. if not exist "input.txt" (echo "File don't exists" goto :EOF) Because I want to inform the user first and then exit the batch.
If I put the code as if not exist "input.txt" (echo "File don't exists") goto :EOF The goto :EOF gets executed even the input file exists.
Summary: I am using WinXP. I have a batch file that runs on every startup but I would like it to run only on a certain day of the week. I am trying to use if statements to check the date, but the %date% variab...
Summary: hello friends, i am hoping someone here can offer me some help. I have the following command. tasklist /FI "IMAGENAME eq outlook.exe" /FO CSV > C:\temp\search.log This creates a file called search.log...
Summary: Does any one know how I can make multiple columns in Visual C++ 5.0. Its API commands, and I was wondering if I can do it in msvc++'s gui. ...