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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help!! how to copy 1 file to complit workgruop

Status
Not open for further replies.

jbiz

MIS
Sep 26, 2003
3
VE
can any one tell me how to copy 1 file to a complit workgruop by a command in cmd
 
Hi,

Unless the workgroup only consists of 2 computers, there is no way of copying a file from one to every other pc within a workgroup with only one command.
However, you could write a batch file to copy it from its source to a specified destination on every computer and have each person run it.

The syntax of the copy command for copying a file is:

copy [drive:][path\]source [drive]:[path\]destination

eg
copy "c:\documents and settings\fred\my documents\doc1.doc" "z:\doc2.doc"

the items in brackets are optional. Instead of drive:path, you can use UNC mappings as well, as in \\machinename\sharename.

in this case eg:
copy \\computer1\documents\fred\doc1.doc \\computer2\documents\fred\doc2.doc

John
 
You could use psexec (part of pstools, freeware from in conjunction with a batch file/for statement. Or if all machines have a share, just a batch file with a copy (or xcopy) statement for each machine would do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top