Windows batch logic for skipping powered off computers -
i'm using third-party utility (setacl.exe) takes ownership , alter permissions of single file on many networked computers. tried using powershell, gave up, using setacl.exe batch file instead. script copies 32-bit ie executable 64-bit folder (the reason needs done complicated :) )
the batch file works - reads computers want create alter on, text file - until nail pc that's powered off or has affected process running.
i've been playing logic skip pcs, haven't been able create work. can help? re-create section of script (which works perfectly) follows:
@echo off set logfile="%~dpn0.log" /f "usebackq delims=" %%i in (computers.txt) robocopy "\\%%i\c$\program files (x86)\internet explorer" "\\%%i\c$\program files\internet explorer" "iexplore.exe" >>%logfile%
at command line, type robocopy /?
see options.
this relevant section in case:
:: :: retry options : :: /r:n :: number of retries on failed copies: default 1 million. /w:n :: wait time between retries: default 30 seconds. /reg :: save /r:n , /w:n in registry default settings. /tbd :: wait sharenames defined (retry error 67).
add /r:0
parameter robocopy
command. create robocopy
retry 0 times before failing.
windows batch-file
No comments:
Post a Comment