I need help with writing a batch script for
if file newfile.txt exists
then del "InDesignData.txt"
ren "newfile.txt" "InDesignData.txt"
You can use simple curved brackets (also supporting else!)
@echo off
IF EXIST newfile.txt (
del "InDesignData.txt"
ren "newfile.txt" "InDesignData.txt"
)
With else:
@echo off
IF EXIST newfile.txt (
del "InDesignData.txt"
ren "newfile.txt" "InDesignData.txt"
) else (
echo Making tea
)