viewpoint-particle

Author Topic: Create favorite and/or shortcut from selected directory  (Read 1507 times)

Ron47

  • Newbie
  • *
  • Posts: 17
Create favorite and/or shortcut from selected directory
« on: October 26, 2015, 11:21:02 am »

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

  • Tech Support
  • *****
  • Posts: 2141
    • WinBatch
Re: Create favorite and/or shortcut from selected directory
« Reply #1 on: October 26, 2015, 01:39:22 pm »
Maybe check out the AskDirectory function in the Consolidated WIL Help file. 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Ron47

  • Newbie
  • *
  • Posts: 17
Re: Create favorite and/or shortcut from selected directory
« Reply #2 on: October 26, 2015, 05:59:38 pm »
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

  • Tech Support
  • *****
  • Posts: 2141
    • WinBatch
Re: Create favorite and/or shortcut from selected directory
« Reply #3 on: October 26, 2015, 08:45:27 pm »
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?
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Ron47

  • Newbie
  • *
  • Posts: 17
Re: Create favorite and/or shortcut from selected directory
« Reply #4 on: October 27, 2015, 08:51:28 am »
A voice command. User selects a folder and issues a command to make it a favorite. (Actually, this would be one command.)

td

  • Tech Support
  • *****
  • Posts: 2141
    • WinBatch
Re: Create favorite and/or shortcut from selected directory
« Reply #5 on: October 27, 2015, 11:41:56 am »
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.

"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


Ron47

  • Newbie
  • *
  • Posts: 17
Re: Create favorite and/or shortcut from selected directory
« Reply #6 on: October 27, 2015, 03:17:44 pm »
Will look at this. Thanks!