I want to run a centrally stored batch file from a right click context menu, but the batch file needs to change its' relative location (%~dp0) reference to where the user right clicked instead of the location of the batch file.
So basically I need this sequence to work...
1) When a user selects an option from a Right Click context menu in File Explorer, the folder they are in is set as a variable
2) A batch file is started and uses the location variable set in step 1 for the work being performed...
I know the batch code for doing the work I want done (creating new folders) and I am able to create a registry entry for the right click context menu, I just don't know how to pass the folder location the user right clicked in as a variable to use in the batch file.
Thoughts? Would PowerShell be a better option?