Create favorite and/or shortcut from selected directory

Started by Ron47, October 26, 2015, 11:21:02 AM

Previous topic - Next topic

Ron47


User selects a folder in Windows Explorer. I want to create a script that will make a favorite and/or make a shortcut of the selected folder.

I don't know how to use WinBatch to get the folder information.

Thanks!

td

Maybe check out the AskDirectory function in the Consolidated WIL Help file. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Ron47

Thanks. I'm familiar with this but it's not what I'm looking for.

I would like to use WB to determine what directory the user has already selected in Windows Explorer and then make the directory a favorite or make a shortcut of the directory that I can place into another directory.


td

You will need to explain a little more clearly what you are attempting to do.  Hopefully, you don't want to add a folder to favorites every time a user selects one in an Explorer window. That could quickly render the Favorites folder useless.  Not to mention making for an unhappy user. So what is going to trigger adding a 'selected' folder to favorites?
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

Ron47

A voice command. User selects a folder and issues a command to make it a favorite. (Actually, this would be one command.)

td

Very interesting.   Resisting the temptation to ask a bunch of annoying questions, you may be able to get the selected file using the Control Manager Extender.  The cGetLvSelText extender function has a maybe dated example in the Consolidated WIL Help file that demonstrates extracting the selected item from an Explorer Window. 

The RoboScripter tool that is part of your WinBatch distribution can also be used to help automate the writing of a Control Manager scripts.

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade