Search code examples
visual-studio-2010pathclipboard

Easier way to copy the path to a file or directory to the clipboard in visual studio?


To accomplish this I've been right-clicking the file or directory and then selecting Show in Windows Explorer, and then copying the path out of the address bar.

Is there an add-on or macro that can make this task easier?

I'm aware that you can drag a file from Solution Explorer into the editor and it will write out the path, but when doing web development I don't always want the server path, sometimes I want the local path.


Solution

  • Look at PowerCommands extension

    http://visualstudiogallery.msdn.microsoft.com/e5f41ad9-4edc-4912-bca3-91147db95b99?SRC=Home

    Among others, it contains "Copy Path" command for files and folders

    UPD: Also, another option: right-click the tab of open document and there will be "Copy Full Path" command. It's built-in, no extensions needed