sweept Posted September 18, 2008 Share Posted September 18, 2008 (edited) how is it possible to reseed %1 %2 %3so its becomes possible to reuse them as %1 %2 %3 for starting a new batchthanks Edited September 18, 2008 by sweept Link to comment Share on other sites More sharing options...
Yzöwl Posted September 18, 2008 Share Posted September 18, 2008 I'm not sure I understand your requirements, could you please try to be little more explanatory. Link to comment Share on other sites More sharing options...
IcemanND Posted September 18, 2008 Share Posted September 18, 2008 You want to change the values of %1 %2...? Or you want to reuse them a second time? Link to comment Share on other sites More sharing options...
sweept Posted September 18, 2008 Author Share Posted September 18, 2008 (edited) You want to change the values of %1 %2...? Or you want to reuse them a second time? yes IcemanND I want to reuse them a second time pass them on to the next batch.bat that can use the same ones as inherited regardless to what they are ...in theory it needs to retrieve 1 2 3 and some how pass them on initiating the next batch2.bat thanks Edited September 18, 2008 by sweept Link to comment Share on other sites More sharing options...
Scr1ptW1zard Posted September 18, 2008 Share Posted September 18, 2008 Here is a simple example:Batch.bat@echo off::Batch.batEcho Running batch.bat...echo Parameter #1: %1echo Parameter #2: %2echo Parameter #3: %3call batch2.bat %1 %2 %3echo batch.bat done!Batch2.bat:@echo off::Batch2.batEcho Running batch2.bat...echo Parameter #1: %1echo Parameter #2: %2echo Parameter #3: %3echo batch2.bat done!Place both files in the same directory.Launch using the following command: Batch.bat one two threeHTH Link to comment Share on other sites More sharing options...
sweept Posted September 19, 2008 Author Share Posted September 19, 2008 thank you guyswill go and experiment it now Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now