You could simplify by using NET VIEW and write that to a file such as NetworkedComputers.list ( to build a list ) by running NET VIEW>>NetworkedComputers.list then input that list into an array and then have the command go through each and every networked system on the list..
Running this command will write the output of NET VIEW to NetworkedComputers.list file ( Notation on the domain could be an issue with this list when only wanting names so you might have to go into this file and remove notation.)
""Warning without modifying this list it will go to ALL Systems and SERVERS that are part of the domain including the system that the batch is triggered from with the next portion in which you are copying files""If you want to exclude the servers from the run you can add IF statements to test for known server names or manually edit the .list file so that it doesnt hit those systems from a single system that would run this batch server side.
This list created by:
NET VIEW>>NetworkedComputers.list
Only needs to be run once to build your list.
Then your batch will interact with this list, and all you need to do is edit the list instead of the actual batch file to add or remove systems to get the files.
If you are unsure how to read in from list into array etc let us know. If I had more time I'd put an example together but lunch break is over with and time to get back to IT.
Here is a quick peek at a sampleof it run at my network: You will need to condition (strip junk out of it) so that all you have it the list of computer names. Merchandiser below being a notation on the domain. And you will want to strip/remove all \\ and Server Name and Remark and ----------- in order to have clean names that can be passed into the batch arguments and function properly.
Server Name Remark
-------------------------------------------------------------------------------
\\ACCT1
\\ADAST
\\ADETNARAID
\\ADHANDL360
\\ADLEBRAID
\\ADLYMERAID
\\ADMINASST
\\ASTREET2003
\\ASTREETVLI8
\\BBXP
\\BONNIEXP
\\CAERDYDD
\\CATERXP1
\\CATERXP5
\\CATERXP6
\\CATERXP7
\\CATERXP8
\\CHEFXP
\\CHICMERC Merchandiser