Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

was unexpected at this time in basic if then statement

I am trying this and can not get it to work ? Get datareal\copiesdonotdelete.txt was unexpected at this time.

rem @echo off
if exists datareal\copiesdonotdelete.txt goto DoFunction1
Goto DoFunction2
Exit
:DOFunction1
rename data datatemp
rename datareal data
rename datatemp datacopyfiles
Echo Done
Exit
:DOFunction2
 rename data datatemp
 rename datacopyfiles data
 rename datatemp datareal
 Echo Done
 Exit
like image 456
Silhouett Avatar asked Sep 11 '12 18:09

Silhouett


1 Answers

Its exist not exists

if exist datareal\copiesdonotdelete.txt goto DoFunction1
like image 63
Gratzy Avatar answered Nov 15 '22 10:11

Gratzy