Abyssmedia.com Forum Index Abyssmedia.com
Abyssmedia Support Forums
 
  FAQ    Search    Memberlist    Usergroups   Register 
  Profile    Log in to check your private messages    Log in 

EXE-files with switches - Possibile or in the future

 
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler
View previous topic :: View next topic  
Author Message
Peter



Joined: 25 Apr 2005
Posts: 1

PostPosted: Mon Apr 25, 2005 7:06 am    Post subject: Reply with quote

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

PostPosted: Mon Apr 25, 2005 9:28 pm    Post subject: Reply with quote

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

PostPosted: Thu May 19, 2005 12:52 am    Post subject: Reply with quote

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

PostPosted: Thu May 19, 2005 4:25 pm    Post subject: Reply with quote

Yes, EXE file work as original BAT with command line options
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2011 phpBB Group