I play with the IF EXIST batch file command, but run into a script. What I'm trying to do is
IF EXIST C: \ Windows \ system32 batchfile2 call
IF EXIST C: \ WINNT \ system32 call batchfile3
But there are scenarios where both directories exist on the PC if win2k was upgraded to XP instead of a new XP installation. What I want it to do if it detects both directories is to "do nothing", since the first two options above already care about what I want to do. Can someone tell me how I can manipulate this?
In addition to the above, I believe that I can also call routines in the same group, but how can I create a routine to end a script if it detects both "Windows \ system32" and "WINNT \ system32"?
IF EXISTS C: \ Windows \ system32 goto sub1 else goto sub2
: sub1
: sub2
Thank you very much in advance.
source
share