Update: I’ve been notified by Mark that this is completely useless. Please disregard 🙂 In Win7 and 2008 you get the same option by just holding down Shift as you right-click. Thanks Mark!
Ever find yourself in Windows, browing through files and needing to copy a file’s full path? As a developer, this seems to happen often, and I today I got tired of not having a quick way of doing this.
A little registry tweak later, I now have a Copy Path command on my right-click menus in Windows Explorer.
This puts the path to the selected file (or folder) in the clipboard. Quite handy for quickly opening that file in an application without having to navigate folders or type the path.
Download and run the Regedit file here.
That menu option is just conigured to run the following PowerShell command:
c:windowssystem32WindowsPowerShellv1.0PowerShell.exe -Command “‘%1’ | clip”
Simple, yet very effective.
3 responses to “Copy File Path in Windows Explorer”
Did you know in Windows 7 and Windows 2008 (I think), just hold down shift and right click on the file and you have that same option.
Son of a….
Sweet, I didn’t know that. Thanks!
There are other places that they hide menu options like that. Most notably the “Run as Administrator” function on some shortcuts on the start menu is not available unless you hold down shift and right click.
Sorry I couldn’t help you out before you wrote the script.