Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy multiple files to multiple computers

Status
Not open for further replies.
Oct 8, 2002
62
0
0
US
Im having trouble writing a cmd script trying to copy multiple file onto multiple computers....

All i have so far is... Creating two file one contains a list of workstations and the other is the CMD file.
When i plug in the nessary info it doesn't work????

is there anyone out there who might know of a different way of accomplishing this?????

or maybe im writing this wrong????

Create a list of workstations:

-----wslist.txt------
Workstation1
Workstation2
Workstation3
---------------------

Next, create this batch file:

-----copyIt.cmd------
@echo off
for %%a in (wslist.txt) do (
net use \\%%a\ipc$ /user:administrator password
::where password is equal to the administrator's password
xcopy /i c:\sourcefiles \\%%a\c$\Destination
)
-----------------------
 
Try this.
[tt]
for /f %%a in (wslist.txt) do (
[/tt]
 
still not working. I have a CMD that works but is only on a one work station... i want to get this to work with a list of multiple work stations an can't get the syntax right????? can someone help me????

@echo off

if exist "C:\Documents and Settings\filename" goto delete
if not exist "C:\Documents and Settings\filename" goto copyng

:delete
del "C:\Documents and Settings\filename" goto copyng

:copyng
xcopy "\\Server\share\folder\subfolder\*.*" "C:\Documents and Settings\folder\"/h/y
goto end

:end
 
for ... (file-set) do ..." kind of usage is for win2k up. Check the OS on which it is running. Or post the question to the desktop forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top