|OKay to spread the if statement acrost multiple lines, you need a space between 1 and (|
example: errorlevel 1 (
That is why it isnt' doing the waiting, next you will find that your terminationcounter isn't working either. You're setting the count in a variable named terminationcounter but your if statement is checking a variable named counter.
The following is your batch, just changed a couple a couple things, Added the space where needed, also renamed counter check in the if statement.
set/a terminationCounter += 1
copy "C:\somefile.txt" "C:\Backup"
if ErrorLevel 1 (
PING 126.96.36.199 -n 1 -w 3600000 >NUL
if %terminationcounter% EQU 5 (exit)