How do I create a shortcut in the Send To menu that runs a program with a command line option?

To add an item to your Send To menu, create a shortcut in the Send To folder. The easy way to do this is to open an Explorer window and type shell:sendto in the address bar. This will take you straight to the Send To folder. From there, you can right-click an empty space and select NewShortcut, and then fill in the information about the program you want to send to.

The default behavior is to run the shortcut target with the file on the command line. But what if you want the program to run with a special command line option?

When you fill in the information about the shortcut, include the command line options when you say what you want to be a shortcut to:

What item would you like to create a shortcut for?
This wizard helps you to create shortcuts to local or network programs, files, folders, computers, or Internet addresses.
Type the location of the item:
notepad /a   Browse…

Here, I'm creating a shortcut to Notepad with the command line option /a which forces a file to be opened in the ANSI code page.

If you right-click a file and send it to this shortcut, it will run Notepad with the /a command line option.

Bonus: Send To simulates a drop on the shortcut, and this technique applies generally to drag/drop operations on shortcuts: Create a shortcut anywhere using this technique, then drop a file on the shortcut. It will open Notepad with the /a command line option.

Comments (16)
  1. Steve says:

    You might want to expand the bounding rectangle on your otherwise-impressive CSS graphic; on W10 Chrome the ‘for?’ and Browse button are both outside the right-hand margin of the bounding box :(

    1. Steve says:

      And on Edge. Oops!

    2. French Guy says:

      On W7 Firefox, the bounding box cuts through the “?” and the “Browse…” button.

    3. Smithers says:

      The div the with the border and the table inside it both have the same css width, but the div also has nonzero padding. Normally this would work, but bootstrap.min.css is setting the box-sizing to border-box on everything, meaning the div’s width includes the padding. Raymond must have created the graphic in a context that doesn’t import bootstrap.

      For more fun, open developer tools and disable the “box-sizing: border box;” property (and prefixed variants) and see what happens to the rest of the page layout.

      1. Thanks. Sigh, yet another rule I have to disable. I hate it when the hosting software creates global changes like this. (My authoring system is not fancy at all. I write raw HTML and load it up into a browser. My raw HTML doesn’t have any of the hosting software’s crazy CSS in it.)

  2. GPF says:

    To heck with these graphic nitpicky nerds, this is a trick I’ve never known about!

    Thanks Raymond. Thaymond.

    1. ixe013 says:

      Not to mention shell:sendto trick. Works from the command line with `start shell:sento` and there are many others shell:xxxx !

      1. I out of curiosity tried shell:startup to go to Star Menu\Programs\Startup the and it works. This will be very handy as having to navigate deep into AppData is annoying

  3. Josh says:

    Wow, I didn’t know you could navigate directly there! I’ve always hunted around trying to find that! Seems there are tons of shortcuts you can navigate with using shell: – found this on stackexchange

    1. MarcK4096 says:

      Very awesome! Thanks for finding this, Josh.

  4. Ted M says:

    I appreciate using this because I can have a graphical link to a specific command-line activity I’m only going to perform once (like netsh wlan [start/stop] hostednetwork, or ipconfig [/release//renew] and it saves the half second it would have taken to bring up an administrator command prompt and type that in.

    1. Ted M says:

      Granted, I lose the ability to see any error messages those single-shot operations may throw but if I needed that to troubleshoot I would have gone through the command prompt anyway.

    2. Alex Cohn says:

      You can use cmd /k netsh

  5. Al go says:

    Does this still send the file name as a parameter too? And if so, where, at the end?
    For example, say a program used this syntax
    Program.exe -input=filename

    1. Brian_EE says:

      How simple would it be to test this for yourself? Write a little program that displays the passed command line in a msgbox and then create the shortcut to see what you get.

  6. mikeb says:

    And don’t forget that if you have more complex needs (like some options have to come after the name of the sent/dropped file for some reason) you could always write a small cmd script that fixes things up for you and have the sendto shortcut run the script.

Comments are closed.

Skip to main content