Dropping files onto desktop shortcuts

G

Guest

I want to make a shortcut onto which I can drop files. The file names are
then to be supplied in the command line passed to the target program.

I can make the shortcut. The target is not to an executable, but is a file
whose extension has an associated executable. When I click on the icon, the
program runs, using the taarget file. If I add text in the target field after
the target file name, clicking the icon runs the program and supplies the
text as arguments.

When I drop files on the icon, however, nothing happens. Adding %1 or %* to
the target line does not help; nothing still happens.

If you can help, I thank you,
Fred Hansen

Where is the documentation for shortcuts?
How can I find out what can be put in a shortcut's Target field?
Are there other magic sequences like %1?
Or is %1 only expanded by some applications and not others?
 
G

Guest

David Candy said:
Perhaps you should ask your specific question not a general question.


Okay. The question is this:
How do I make a shortcut onto which I can drag files?
I want the paths to those files to appear as arguments
to the executing program.

To be even more specific, suppose the shortcut's target file is c:\candy.xyz
and my file types associate with extension xyz the program
c:\Program Files\AlphabetZoo\xyzhandler.exe
When files c:\abc and c:\def are dropped on the shortcut, I want to begin
execution of xyzhandler.exe and the arguments should be
/a c:\candy.xyz /f c:\abc c:\def
(Here /a and /f are constants in the target string.)
 
G

Guest

How do I make a shortcut onto which I can drag files?
I want the paths to those files to appear as arguments
to the executing program.

To be even more specific, suppose the shortcut's target file is c:\candy.xyz
and my file types associate with extension xyz the program
c:\Program Files\AlphabetZoo\xyzhandler.exe
When files c:\abc and c:\def are dropped on the shortcut, I want to begin
execution of xyzhandler.exe and the arguments should be
/a c:\candy.xyz /f c:\abc c:\def
(Here /a and /f are constants in the target string.)


Create file runcandy.bat. Put into it:
start "run candy" "c:\candy.xyz" %*

Make a shortcut to runcandy.bat and put it on your desktop.
Edit its properties and set the Run: filed to "minimized".

Now you can click on the shortcut or drop files on it and it will run.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top