我正在尝试这个并且无法让它发挥作用?获取datareal \ copiesdonotdelete.txt此时出乎意料。
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
答案 0 :(得分:10)
它存在不存在
if exist datareal\copiesdonotdelete.txt goto DoFunction1