jeudi 29 octobre 2015

batch multi-condition if else ==batch==

I would like to know how to use multicondition if else. For example I am looking if the folder (A) exists then move it to another folder (B) else if the folder (B) exists then move it to another folder (A) else msg * no such directry

code:

if exist ( C:\Users\%username%\AppData\ABC\
taskkill /f /im File.exe 
move C:\Users\%username%\ABC C:\Windows\system\ABC2\
msg * Move 
exit
 ) else if exist ( C:\Windows\system\Cool\
taskkill /f /im Viber.exe
move C:\Windows\system\Cool C:\Users\%username%\AppData\Roaming\ViberPC\
msg * You will active your viber thank you Enjoy it baby. i love you all 
exit
 ) else ( 
msg * This account (number) does not exist please singup on your smartphone to get acces thank you ... have a nice day
 ) )
pause

Aucun commentaire:

Enregistrer un commentaire