net_user Posted January 19, 2006 Posted January 19, 2006 (edited) ok...here is my setup.these files are on the root of my c: drive pc.txt, code.bat, run.bat(pc.txt)\\pc1\c$\\pc2\c$(code.bat)md install(run.bat)For /f "tokens=1,2" %%a in (c:\pc.txt) do call code.batso basically1. pc.txt which contains all my puters on my network.2. code.bat is what i want to "execute" on the puters3. run.bat can be executed manually or through scheduled tasks from my puter or a server ect....i'm kinda new learing the "for" command...and can see that it does allot...heheany input to what i have wrong here?thanks Edited January 19, 2006 by net_user
Yzöwl Posted January 19, 2006 Posted January 19, 2006 You are nearly thereFor /f %%a in (c:\pc.txt) do call code.bat %%aThis will input %%a into code.bat as a parameter %1Therefore your code.bat should look something like this:md %1\installThis would then run the followingmd \\pc1\c$\installmd \\pc2\c$\installHope this helps
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now