Jump to content

Recommended Posts

Posted

Hi everyone, need some help or guidance

 

I am using the following from a command line to copy file to multiple remote computers :-

 

robocopy.exe c:\file_ini "\\c5-01\c$\Program Files\usbdlm" usbdlm.ini

 

I want to use a For /f loop to call the computers from a txt file, as I have 100 or so computers to push out the file to.

 

Need some help with syntax :o

Posted

for /f %%i in (c:\temp\comps.txt) do copy /y c:\file_ini "\\%%i\c$\Program Files\usbdlm\usbdlm.ini"

Assuming you have

comp1

comp2

 

etc in c:\temp\comps.txt

 

I've put copy instead of robocopy because I don't think you need robocopy to do what you're trying to do but I hope this points the right way!

  • Thanks 1
Posted

Steve

 

Many thanks for quick response. It has certainly pointed the way

 

I modified slightly as follows

 

for /f %%i in (c:\temp\comps.txt) do robocopy.exe c:\file_ini "\\%%i\c$\Program Files\usbdlm" usbdlm.ini

 

Works a treat

 

Regards

 

Barry

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...