Need help with a little batch script

Soldato
Joined
26 May 2006
Posts
6,207
Location
Edinburgh
I am trying to write a simple batch script to do the following:

If the location of an exe file doesn't exist then run an exe from another location. And to keep things neat, add add an else command if the location of the exe already exists.

I have tried this so far:

IF NOT EXIST c:\testlocation\test1.exe \\networklocation\testnew.exe ELSE echo File already exists

Doesn't appear to be working and I cannot see much wrong with the code.

Any help would be great.
 
Back
Top Bottom