bug in my batch

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
erez669
Posts: 1
Joined: 03 Jan 2023 11:27

bug in my batch

#1 Post by erez669 » 03 Jan 2023 11:30

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
Attachments
112.jpg
112.jpg (92.96 KiB) Viewed 26436 times

Post Reply