Page 1 of 1

bug in my batch

Posted: 03 Jan 2023 11:30
by erez669
i write a simple batch that run list.txt and read server list from that file
the results include an error "the system cannot find file specified
why?

here is the code:

@echo off
cls
For /F "tokens=*" %%a in (list.txt) Do (
echo %%a
schtasks /query /s %%a /fo list /tn "Reboot"
echo.
)

echo operation completed! press enter to close this window
pause > nul
exit