View Single Post
Old 02-03-2005, 21:55   #7
JohnHorb
Guest
 
Location: Sale, Cheshire
Services: 10MB Broadband, DTV, Telephone
Posts: n/a
Re: Need to copy a file accross the network....

Quote:
Originally Posted by Tricky
Are all the machines on the network?

perform a net view > machines.txt
edit machines.txt to remove the information not required leaving you with \\machinename on each line
write a batch file with something along the lines of:
@echo
copy mylicencefile.lic %1\c$\locationoffile

then use from a cmd prompt:
for /f %v in ( machines.txt ) do batchfile %v

This will call the batch file for each line in the machines.txt providing the content of each line in variable %v

PS. You'll need to be an admin on each box to connect to the C$ share!
The issue is spaces in filenames. Haven't tried it, but suspect you could mod the above to

copy mylicencefile.lic "%1\c$\locationoffile"

or similar. I think the key is to enclose paths containing spaces in quotes.
  Reply With Quote