Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a batch file -

@echo off
do something on MACHINE2
XCOPY "\\MACHINE1\abcdef\abcdef" "MACHINE2\abcdef\abcdef"
do something on MACHINE2


This code performs some operations on current machine and then copies something from MACHINE1 to current machine.
I run the same file on MACHINE 2 to MACHINE 100, by copying and editing the file on each Machine.

Can't I edit it in a manner that when I run it on MACHINE 2 only, then the action is done on MACHINE 2 to MACHINE 100?

something like -

for(x IN 2 to 100)
{
@echo off
do something on MACHINEx
XCOPY "\\MACHINE1\abcdef\abcdef" "MACHINEx\abcdef\abcdef"
do something on MACHINEx
}
Posted
Updated 23-Sep-15 20:15pm
v2

1 solution

I am not sure that it is a simple issue; take a look at https://www.google.com/search?q=remote+access+windows+batch[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900