This article from InSource shows how to verify if a file exists using a batch file
- Author: Benjamin Davis
- Published: 04/28/2016
Use the Exist method to verify if a file exist using batch file scripting.
IF EXIST C:\Stuff\HelloWorld.txt (
The script will look in the Stuff folder located on the C drive for a file called HelloWorld.txt.
If the file exist, it will delete the file. If it does not exist, nothing will occur.