Vindicator209 Posted February 2, 2007 Share Posted February 2, 2007 Hey, how would I go about making an executable that would do something when typed in through CMD? such as, if I opened commandprompt, typed in myexe.exe d <archive.zip> I was thinking of making a special archive file type that could only be opened through an executable, but cant be done just by openeing an executable.... I was thinking, if I typed D <archive.zip> it would decompress the file into a folder, or if C <archive.zip> would compress it back into an archive.... =/ sorry if my question isint clear ..... Thanks `MethodZero [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
improbability_paradox Posted February 2, 2007 Share Posted February 2, 2007 (edited) Are you talking about using command line parameters? If so, you would do something like this $Compress=False if $CmdLine[0]>2 then if $CmdLine[1]="C" then $Compress=True $filename=$CmdLine[2] endif This is just an example, and can easily be adapted to accommodate additional command line parameters, or parameters passed in a different order (via a loop) as a point of reference, $CmdLine[0] automatically returns the number of command line parameters passed. Edited February 2, 2007 by improbability_paradox Link to comment Share on other sites More sharing options...
Vindicator209 Posted February 7, 2007 Author Share Posted February 7, 2007 sorry for the 6 day late reply, thanks, it works great [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] 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