I have a problem with my program, I don't know how can I make it detect that the file NewFile(%i%)
exists.
for /l %%i in (1, 1, 100) do (
if EXIST NewFile(%i%).txt (
echo "New file"> NewFile(%%i).txt
goto EndLoop
)
if EXIST NewFile.txt(
echo "New file"> NewFile(%%i).txt
goto EndLoop
) else (
echo "New file"> NewFile.txt
goto EndLoop
)
)
It says ") was unexpected at this time."
How can I fix this?
Aucun commentaire:
Enregistrer un commentaire