jrwinterburn
IS-IT--Management
Hi all,
I have a batch file which will copy an updated copy of a file onto all the PCs in the domain. However, there are 80 PCs it has to copy to, and I'm not sure how to make the batch file cycle through all the PCs without having to enter each command.
The command is:
xcopy C:\MyProg\MyProg.exe \\PC1\C$\MyProg /c /f /y /z
I want to run this one command against all PC names - which are named as such: PC1, PC2, PC3 and so on up to PC80. How can I replace PC1 in that command to cycle through 1-80?
Thanks.
Jon
I have a batch file which will copy an updated copy of a file onto all the PCs in the domain. However, there are 80 PCs it has to copy to, and I'm not sure how to make the batch file cycle through all the PCs without having to enter each command.
The command is:
xcopy C:\MyProg\MyProg.exe \\PC1\C$\MyProg /c /f /y /z
I want to run this one command against all PC names - which are named as such: PC1, PC2, PC3 and so on up to PC80. How can I replace PC1 in that command to cycle through 1-80?
Thanks.
Jon