how can i run a batch that ends with "_1" or a batch that contains "_" for example from another batch file
abcd_1.bat or abcd_efgh.bat, abcd and efgh can be anything
10x
This post has been edited by balanel: 29 December 2011 - 06:33 AM
Posted 29 December 2011 - 06:32 AM
This post has been edited by balanel: 29 December 2011 - 06:33 AM
Posted 29 December 2011 - 09:37 AM
@echo off "abcd_efgh.bat"
This post has been edited by iamtheky: 29 December 2011 - 09:41 AM
Posted 29 December 2011 - 12:15 PM
@FOR /F "TOKENS=*" %%# IN ('DIR/B/A-D *_*.BAT') DO @(CALL "%%#")
Posted 29 December 2011 - 12:51 PM
Posted 29 December 2011 - 03:29 PM
@FOR %%# IN (*_*.BAT) DO @(CALL "%%#")I posted the former because as a for loop 'command' rather than 'file set' you have more control over the variables, (and they're easier to maintain), simply by changing the contents of the loop or the tokens/delimiters rather than parsing through resulting variables with extra code later.