1.

Solve : Question on IF command?

Answer»

can i have a IF statement follow with 2 process after the IF? EXAMPLE like
IF EXIST c:\TEST.txt rmdir c:\abc xcopy c:\def c:\abc
is this working?Quote

can i have a IF statement follow with 2 process after the IF? example like
IF EXIST c:\test.txt rmdir c:\abc xcopy c:\def c:\abc
is this working?

you could actually test your commands out and verify for yourself...
you can also use the & operator.
eg if EXISTS &
There are several ways you could have an IF statement follow multiple processes. Here are some examples:
Code: [Select]if exist c:\test.txt rmdir c:\abc&xcopy c:\def c:\abc\
Code: [Select]if exist c:\test.txt (
rmdir c:\abc
xcopy c:\def c:\abc\
)
Code: [Select]if exist c:\test.txt goto :Label1
rem more code here if necessary
goto :EOF
:Label1
rmdir c:\abc
xcopy c:\def c:\abc\thanks all...


Discussion

No Comment Found