Computing.Net > Forums > Windows Vista > Help with an if then statement in .bat coding

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.

Help with an if then statement in .bat coding

Reply to Message Icon

Name: Jibe
Date: August 13, 2009 at 10:01:43 Pacific
OS: Windows Vista
CPU/Ram: P8400/4GB
Product: Hp (hewlett-packard) Pavilion dv5t notebook - customizable
Subcategory: Software Problems
Comment:

I am making a .bat file to start multiple files
from one shortcut. The thing is I need to right
an if then statement in it and I am kind of new
to the coding. The current file says:

@echo off
rem iTunes
cd C:\Program Files (x86)\iTunes
start iTunes.exe
rem WC3Banlist
cd C:\Program Files (x86)\WC3Banlist
start WC3Banlist.exe
rem Warcraft3
cd C:\Program Files (x86)\Warcraft III
start war3.exe
exit

But I need to add and if then or else
statement. It needs to be
if itunes.exe is running then do nothing, else
cd C:\Program Files (x86)\iTunes
start iTunes.exe

Then a similar thing for the other two.



Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: August 14, 2009 at 17:24:38 Pacific
Reply:

Post this in the Programming Forum... link on the right of this page.

http://ewen.uuuq.com/


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows Vista Forum Home


Sponsored links

Ads by Google


Results for: Help with an if then statement in .bat coding

Apply Batch To a File By Open With www.computing.net/answers/windows-vista/apply-batch-to-a-file-by-open-with/3446.html

reading blogs on bbc sport www.computing.net/answers/windows-vista/reading-blogs-on-bbc-sport/6106.html

DualBoot XP/Vista problem www.computing.net/answers/windows-vista/dualboot-xpvista-problem/3081.html