Run .bat on current directory?

Discussion, questions and support.
Post Reply
Message
Author
arewar
Posts: 3
Joined: 25.11.2015, 15:11

Run .bat on current directory?

#1 Post by arewar » 04.12.2015, 20:29

Please point me to any docs that outline how to do this. I've searched around but can't be sure I know exactly what I'm looking for.

I'd like to be able to have a button (or menu option or something inside FC) that will run a .bat script, and that script contain some kind of variable that points it to the current open & active directory.

Is this doable?

yesolo
Posts: 3
Joined: 01.12.2015, 16:04

Re: Run .bat on current directory?

#2 Post by yesolo » 07.12.2015, 09:51

You may get a button on your favorite apps panel in case if you've already had a .bat file you need. Set the %ActiveDir% parameter for your new fav apps item that will point to the active dir. Icon for the button could be taken from the Windows/System32/shell32.dll

Some information about favorite apps panel could be found here http://www.freecommander.com/fchelpxe/e ... ander.html

I think it may help you.

arewar
Posts: 3
Joined: 25.11.2015, 15:11

Re: Run .bat on current directory?

#3 Post by arewar » 16.12.2015, 15:08

Thank you, that got me on the right track.

For anyone else who references this, this is the solution for me:

Tools - Favorite Tools - Favorite Tools Edit
Created new item
Program or folder = my .bat file
Start Folder = %ActivDir%
Parameter = %ActivDir%

In the .bat file, use %1 to reference the parameter for the batch file, which will be the %ActivDir%.

When the button is clicked, it runs the .bat in the currently selected directory.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 35 guests