Wednesday, February 14, 2007

Copy As Path

Here's a cool little Vista trick I just learned:

  1. Browse to a file. 
  2. Hold down shift and right-click on the file.
  3. Select "Copy as Path"

The path for the file, include the filename, is now in your clipboard.  You can paste it into any app.  This is useful when sending a network file's path in mail or when trying to execute a file with command-line parameters (just paste into the run prompt or a cmd window).

5 comments:

  1. For WinXP we have an addon "ClipThis" [1]. It works via SendTo contextmenu.
    [1] http://www.clickomania.ch/progs/ClipThisD.htm
       (In German, sorry)

    ReplyDelete
  2. ...but Vista removed the ability to drag and drop to the command prompt- a technique that provided this same functionality (adding command line args) with a lot less steps.

    ReplyDelete
  3. @Alan - I very much miss the ability to drag a file to the command line and have its path automatically pasted there.  Believe it or not, I tried to get that one put back in but there are some good reasons it was removed.  This is a slightly longer method but can be used to get around that now-removed feature.  This one does have some advantages that weren't in the previous one though.  Pasting the path into a text editor is now possible whereas before, it wasn't.

    ReplyDelete
  4. Can you elaborate on the reasons for removal?  That would make for an interesting article.

    ReplyDelete
  5. Unfortunately I can't.  You are correct that it would make for an interesting article.  Alas, I am not in the group that owns this code and my understanding of exactly why it was taken out is second hand.  I'm sure I'd get something wrong if I were to try to explain in any detail.

    ReplyDelete