script to copy files to machines
i made this a few years ago to copy the ucas software to computers but it had to cope with the possibility that machines might be off. It loops keeping track of machines which are unreachable and retrying them. shouldnt be too hard to change it for other files.
Code:
@echo off
set filenum=1
if exist off1.txt del off1.txt
copy complist.txt off1.txt
:loop
set /a file1=%filenum%
set /a file2=%filenum%+1
echo off%file1%.txt and off%file2%.txt
for /f %%a in (off%file1%.txt) do (
if not exist "\\%%a\c$\" echo %%a off && echo %%a >> off%file2%.txt
if exist "\\%%a\c$\" (
echo go %%a
md "\\%%a\c$\program files\eas2005"
copy k:\eas2005\wssetup\client\*.* "\\%%a\c$\program files\eas2005\"
copy k:\eas2005\wssetup\eas05a32.ini "\\%%a\c$\winnt"
copy K:\eas2005\WSSETUP\icon\*.lnk "\\%%a\c$\icons")
)
set filenum=%file2%
del off%file1%.txt
goto loop
Re: script to copy files to machines
You should replace the 'copy's with 'robocopy's :)