Code: Select all
c:\
12345678.txt
123456789.txt
87654321.txt
test.txt
c:\
Code: Select all
c:\
12345678.txt
123456789.txt
87654321.txt
test.txt
c:\
Code: Select all
@echo off
:loop
echo Attempting Time Sync...
w32tm /resync | find /i "The command completed successfully." >nul || (echo Sync Not Working, Retrying...&goto loop)
echo Success!!!!!
pause
exit
Code: Select all
:AppendFileLineToFile-args
Code: Select all
if "[%~4]" NEQ "[]" ( shift & GoTo :AppendFileLineToFile-arg )
Code: Select all
Rem (if command errors) || (exec this command)
Code: Select all
copy file.txt folder\file1.txt
copy file.txt folder\file2.txt
copy file.txt folder\file3.txt
copy file.txt folder\file4.txt