@echo off rem *** COPYCOMMANDS.CMD: Copies all PC-RDist related batch commands from rem one computer to another. *** rem rem SYNTAX: COPYCOMMANDS [source] target rem rem PARAMETER: rem rem source rem computer from which to copy commands. If omitted, assumed rem current computer. rem rem target rem computer, lab, or group of labs to which to copy commands. rem rem Requires massproc.cmd, timeout.exe. setlocal enableextensions set target=%2 if not defined target ( set source=this computer set sourcepath=C:\progra~1\pc-rdist set target=%1 ) else ( set source=%1 set sourcepath=\\%1\c$\progra~1\pc-rdist ) set conftext=copy batch commands from %source% to :main call massproc.cmd if defined exit goto end set targetpath=%unc%\c$\progra~1\PC-Rdist move /y %targetpath%\pcrdist.log %unc%\c$ 2> nul del %targetpath%\*.* /q /f xcopy %sourcepath%\*.* %targetpath% /o /q /y move /y %unc%\c$\pcrdist.log %targetpath% 2> nul goto main :end timeout 10 endlocal