Jump to content

Recommended Posts

Posted (edited)

hi

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

Edited by balanel

Posted (edited)

to run "abcd_efgh.bat", "abcd_1.bat" would consist of:


@echo off
"abcd_efgh.bat"

**That seems fairly straight forward, works without quotes, what error were you receiving that leads you to believe the underscores are the issue?

Edited by iamtheky
Posted

Please remember that there is a more simple method too:

@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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...