Home > Software design >  How to launch a shortcut from the explorer window I am in/ or folder I click on? to copy what is in
How to launch a shortcut from the explorer window I am in/ or folder I click on? to copy what is in

Time:10-24

I am looking for a way to start a shortcut to a batch file using as start directory the folder I select with my mouse/or the folder I am in, and launch it with a keyboard shortcut.

example: My .bat is in whatever directory, same for my shortcut file, which has Ctrl maj Z as key shortcut. (this already works the way I want)

I click/navigate to the folder I want to execute the .bat, and use Ctrl maj Z. Then I want to go in an other folder and do Ctrl maj Z again to use the .bat on this folder.

The problem is, it always starts in the folder where the .bat file is.

I already tried to clear the "start in" box from shortcut properties, but I can't replace it with what my mouse targeted, I feel like I could do it with the "target" box, but I don't know how since my target will never be the same folder.

The end goal is to copy some files from some folders to an other folder on the desktop, this works fine if I drop the .bat file in the 1st folder but I don't want to do that every time, it kills the efficiency. (working on win10) I am sure some of you has some kind of trick for me.

Thank you.

CodePudding user response:

In my simple test, if I clear the "Start in" field then

  • Related