What would the contents of a bat file be if I want the following
If a file exists (file name and location)
Then delete the file and then restart the computer
What would the contents of a bat file be if I want the following
If a file exists (file name and location)
Then delete the file and then restart the computer
 
    
    It's pretty straightforward -
@echo off
set FileToCheck=NAME_OF_THE_FILE_HERE
if not exist %FileToCheck% goto done
del %FileToCheck%
shutdown /r
:done
You could also use set FileToCheck=%1 instead of hard-coding the filename in your batch file if you want to pass the filename to look for as a command line parameter,  i.e. (assuming your batch file is named foo.bat):
c:\>foo RemoveMeAndRebootIfIExist.txt
