Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Shortcut Symbolic Insertion?


  • Please log in to reply
3 replies to this topic

#1 MilesAhead

MilesAhead

  • Members
  • 197 posts
  • OFFLINE
  •  
  • Local time:10:20 PM

Posted 14 September 2008 - 05:29 PM

We all know that when you drag & drop a file onto a shortcut in explorer you get
Open With and if the file is a text file and the shortcut is notepad then the file
will open in notepad.

But what if you want a shortcut with some parameters in the Target line?
Is there a way to substitute the name of the dropped file in a certain position
in the list of params?

Seems like there should be.. but I have a feeling there isn't(aside from hard
coding a 3rd batch file to catch the "%1" that is)

Has anyone seen a way that works?

"I don't want to belong to any club that would have me as a member."
- Groucho Marx


BC AdBot (Login to Remove)

 


#2 usasma

usasma

    Still visually handicapped (avatar is memory developed by my Dad


  • BSOD Kernel Dump Expert
  • 25,090 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Southeastern CT, USA
  • Local time:10:20 PM

Posted 14 September 2008 - 06:02 PM

The thing that opens the file in the application is the file association, not the shortcut - so changing the shortcut won't affect the file association.

Startup parameters usually relate to the launching of the program, not the launching of data that's associated with that program. To do this you'd have to setup a shorcut to launch the program with the parameters desired - then associate the file extension with that new shortcut (rather than the program itself).
My browser caused a flood of traffic, sio my IP address was banned. Hope to fix it soon. Will get back to posting as soon as Im able.

- John  (my website: http://www.carrona.org/ )**If you need a more detailed explanation, please ask for it. I have the Knack. **  If I haven't replied in 48 hours, please send me a message. My eye problems have recently increased and I'm having difficult reading posts. (23 Nov 2017)FYI - I am completely blind in the right eye and ~30% blind in the left eye.<p>If the eye problems get worse suddenly, I may not be able to respond.If that's the case and help is needed, please PM a staff member for assistance.

#3 MilesAhead

MilesAhead
  • Topic Starter

  • Members
  • 197 posts
  • OFFLINE
  •  
  • Local time:10:20 PM

Posted 15 September 2008 - 04:57 PM

The thing that opens the file in the application is the file association, not the shortcut - so changing the shortcut won't affect the file association.

I'm dropping on the shortcut and using Open With
in explorer, not double-clicking


Startup parameters usually relate to the launching of the program, not the launching of data that's associated with that program. To do this you'd have to setup a shorcut to launch the program with the parameters desired - then associate the file extension with that new shortcut (rather than the program itself).


That's just it. I don't want a file extension association. What I want is control of where
the path of the dropped file is inserted in the command line. I just made a little test app
with params in the shortcut. If you drop a shortcut on the shortcut and do Open With
then it sticks the target line of the dropped shortcut on the end. Kind of kills off
having an optional param or I'd have to use switches, which is a pain. Just sort
of experimenting around. For what I'm doing it's not worth it. :thumbsup:

Thanks for the reply. I can see where you'd think of the Open With you get in the
explorer context menu. But I'm talking about the drag & drop target Open With.

"I don't want to belong to any club that would have me as a member."
- Groucho Marx


#4 MilesAhead

MilesAhead
  • Topic Starter

  • Members
  • 197 posts
  • OFFLINE
  •  
  • Local time:10:20 PM

Posted 15 September 2008 - 08:33 PM

Anyway, I changed the program around so it parses switches of the
/x=param variety so it can handle them in any order. Filename has
to be last on the line with no /x switch. At some point desktop
targets may be practical. :thumbsup: Windows is lacking in that there should
be a symbolic substitution for forms of the dropped target text..
such as $fname for filename with no path or ext $fext for just
the extension etc... Save writing a lot of wrapper apps and
scripts!! Sheesh!!!

"I don't want to belong to any club that would have me as a member."
- Groucho Marx





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users