Page 1 of 1

Can scripts launch exe's?

Posted: 09 Sep 2013 05:32
by danman
Ok..I've figured out how to launch scripts from the toolbar, and to assing customized icons to each..which is really cool. Is it also possible to launch a program's exe file via a script assigned to a button on the toolbar? If so, I think I can find a program I can use in that manner that will allow me to search for files on my HD that were created on a specific date...without having to waste time with "between this date and that date."

Re: Can scripts launch exe's?

Posted: 09 Sep 2013 06:26
by j_c_hallgren
danman wrote: If so, I think I can find a program I can use in that manner that will allow me to search for files on my HD that were created on a specific date...without having to waste time with "between this date and that date."
BTW, you did see that Don found/fixed a bug in the date search via the other thread http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=10151, yes?

And thus you only need to put date in one time in the first/between field and put a '1" in second/and field..

Also, you may want to explore the usage of Search Templates which allow search criteria to be saved and reused easily.

The oter possiblity would be (I think) someone who's capable (not me!) of creating a XY script to prompt for a date and then execute search to make it a bit easier.

Re: Can scripts launch exe's?

Posted: 11 Sep 2013 03:18
by danman
Ok, thanks.....but still...the ability to run an exe via a script would be handy. Can it be done?

Re: Can scripts launch exe's?

Posted: 11 Sep 2013 03:27
by j_c_hallgren
danman wrote:Ok, thanks.....but still...the ability to run an exe via a script would be handy. Can it be done?
Even though I'm a retired mainframe COBOL programmer, I never got into XY scripting as really haven't had a need to do so -- but here's a thread from today that shows how an EXE can be run, ok?: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=10166

So I'd suggest you review some threads in the Script Exchange section here and see what you find -- there may be something matching what you want to do already done!

Re: Can scripts launch exe's?

Posted: 11 Sep 2013 09:01
by admin
danman wrote:Ok, thanks.....but still...the ability to run an exe via a script would be handy. Can it be done?
Sure. Try the open command.

Run FireFox:

Code: Select all

open "C:\Programme\Mozilla Firefox\firefox.exe";
Run FireFox (if it is a registered application).

Code: Select all

open "firefox";

Re: Can scripts launch exe's?

Posted: 11 Sep 2013 14:20
by xman
You may also pass selected files as parameters, which is useful with many programs.

Code: Select all

openwith """<xydrive>\Apps\Net\Browsers\FireFox\FirefoxPortable.exe"" <items>", s

Re: Can scripts launch exe's?

Posted: 13 Sep 2013 06:27
by danman
Thanks, guys. With your help, I should be able to get this done. I'm enjoying getting into xy as time permits. Just getting individualized icons onto the toolbar that launch directories I use most has been a big help.