Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I copy files from one location to several machines using psexec and a textfile?

Posted on 2008-11-11
3
Medium Priority
?
283 Views
Last Modified: 2012-05-05
How do I copy files from one location to several machines using psexec and a textfile?
0
Comment
Question by:AndreIfill
  • 2
3 Comments
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22941833
Why bother using PSEXEC to copy?

Command line:
FOR /f %a in (machines.txt) do XCOPY /s /y \\server\share\folder \\%a\c$\folder\*.*

Batch file
FOR /f %%a in (machines.txt) do XCOPY /s /y \\server\share\folder \\%%a\c$\folder\*.*

0
 

Author Comment

by:AndreIfill
ID: 22942045
Can you tell me what the %a is used for?
0
 
LVL 21

Accepted Solution

by:
AmazingTech earned 400 total points
ID: 22942139
In a FOR the %a represents a variable in this example each line in machines.txt is processed 1 by 1.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Integration Management Part 2
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month14 days, 8 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question