windows - How to check if a file exists from inside a batch file -
this question has answer here:
i need run utility if file exists. how do in windows batch?
if exist <insert file name here> ( rem file exists ) else ( rem file doesn't exist )
or on single line (if single action needs occur):
if exist <insert file name here> <action>
for example, opens notepad on autoexec.bat, if file exists:
if exist c:\autoexec.bat notepad c:\autoexec.bat
Comments
Post a Comment