Sometimes even Windows needs scripting, and if the script it’s quite simple you can use the old DOS batch files, although it may be harder than you expect to get it right.
For example, when using the IF…ELSE construct, the indentention is quite picky, and you HAVE TO put the ELSE right behind the IF parethesis
IF EXIST filename (
echo "Filename exists"
) ELSE (
echo "Filename doesn't exist"
)
because otherwise it will break your script. For example, this batch file DOESN’T WORK:
IF EXIST filename (
echo "Filename exists"
)
ELSE (
echo "Filename doesn't exist"
)
and always remember to preput
@echo off
if you don’t want let Windows output your script on the terminal output.