Scripting & Batch

if

Perform conditional processing in a batch file.

if exist file.txt echo Found

exist check for a file · errorlevel check exit code · /i ignore case

Practice line — try it from memory, then reveal

if exist C:\Windows echo Found