Here is a simple way of doing this:
1: Create a text file with all the computer names in it that you want to transfer the file to such as this
-->8 copy below here Computer1 Computer2 Computer3 -->8 copy abover here
2: Here is the script, run it from the same directory that the text file with the computer names is in -->8 copy below here [ at ]ECHO OFF FOR /F %%a in (computers.txt) do ( If exist \\%%a\C$\Location2 SET TARGET=\\%%a\C$\Location2 If exist \\%%a\C$\Location1 SET TARGET=\\%%a\C$\Location1 IF NOT EXIST %LOCATION%\file1.txt COPY C:\file1.txt %TARGET% ) -->8copy above here
I hope you can work out how this works.
Cheers, Jeremy.
"Remco" <Remco[ at ]discussions.microsoft.com> wrote in message news:0F6744AE-3186-49CA-8168-50A5620B0FD2[ at ]microsoft.com...
[Quoted Text] > Hi everybody, > > I'm a newbie with scripting. > Does somebody have a script that i can run from an Admin Workstation > (because of the credentials) that has the following features: > > - Script has to distribute a file accross all Client computers on the > network (not the servers) > - Script has to copy the file in a specific location, if the location > isn't > there than check for another location. > - When the script has copied the file to a machine it may not run again > for > that machine only when the file/registry key isn't there. > > I hope some one can help me. > > Greetzz, > remco
|