| View previous topic :: View next topic |
| Author |
Message |
Peter
Joined: 25 Apr 2005 Posts: 1
|
Posted: Mon Apr 25, 2005 7:06 am Post subject: |
|
|
Will it be possibile in a future version to use switches together with a created EXE, that, lets say points to two different bat-files? If using EXE without slash bat1 would be executed and if together with /? then bat2 would be executed.
This is a great app. // Peter |
|
| Back to top |
|
 |
|
|
Oleg Tsheglov Site Admin
Joined: 13 Feb 2004 Posts: 309
|
Posted: Mon Apr 25, 2005 9:28 pm Post subject: |
|
|
Good idea.
In current version you can include second batch file and parse command line parameters. If you found /? key then you may @call bat2.bat
Edited By Oleg Tsheglov on 1114464528 |
|
| Back to top |
|
 |
darcmarc
Joined: 22 Feb 2005 Posts: 10 Location: USA
|
Posted: Thu May 19, 2005 12:52 am Post subject: |
|
|
I've not tried, but does compiled batch files support switches (so %1= whatever after the exe? ) I only have the trial but it works for me. Example code would be:
| Code: | @echo off
:start
if "%1" == "" (
goto one
)
if "%1" == "/?" (
goto two
)
:one
call bat1.bat
goto eof
:two
call bat2.bat
goto eof
:eof
cls
|
Or an even more optamized version:
| Code: | @echo off
:start
if "%1" == "/?" (
goto two
) else (
goto one
)
:one
call bat1.bat
goto eof
:two
call bat2.bat
goto eof
:eof
cls
|
|
|
| Back to top |
|
 |
Oleg Tsheglov Site Admin
Joined: 13 Feb 2004 Posts: 309
|
Posted: Thu May 19, 2005 4:25 pm Post subject: |
|
|
| Yes, EXE file work as original BAT with command line options |
|
| Back to top |
|
 |
|