Vista Tips: Copy as Path

As a developer one of the features that I used daily was to drag files from Windows Explorer onto a command prompt. This would paste the full path to the file into the command window and was great for command line utilities such as gacutil or caspol. But when Windows Vista come out this feature was removed, for security reasons.

The workaround is to Shift-Right Click on a file or folder and choose Copy as Path. This will copy the full path to the clipboard so you can paste it into the command prompt.

Here is the KB 929457 article to talks about this in more detail. Even though this is a couple of steps more than just drag and drop I think that this method is more useful for copying paths into your code or other applications that didn't support drag and drop anyway.

Also less interesting to me,  but I know there are many command line junkies out there, you can also use this to open a command prompt and the current location. Shift-Right click on a folder and choose open command window here. There are also ways to add shell handlers to do this (here is  a cool one to open a powershell window), but here at Microsoft we are constantly building new machines with the latest build of software and things that are not built in do not make it on these daily build machines.

I would also like to give credit to Fritz Onion my friend from back home in Maine you posted this tip.

Comments (0)

Skip to main content