Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Windows XP I'm very used to being able to drag a folder or file (from Windows Explorer) onto a command prompt and have it paste there the full path to that folder or file (including quotes if needed).

I can't get this to work in Windows Vista/Server 2008 (I've not tried Windows 7). Can this be fixed?

share|improve this question
up vote 2 down vote accepted

Somehow, this useful feature went away in Windows Vista and Windows Server 2008, but has come back in Windows 7.

A possible workaround is using Send To Toys, which adds the "Send To Command Prompt" . It opens a CMD window, setting the current directory to the selected folder. If the selection was a file, the folder containing the file will be the active directory and the name of the file will be typed for you at the prompt. Hold down the CTRL key to change the active directory to a different folder. Hold down the SHIFT key to force the use of the COMMAND.COM regardless of the Windows version.

The only other solution is to hold shift when right-clicking on a file, which gets you the "Copy as path" option, which you can then paste into the command prompt.

I found DropCommand which enables you to drag files easily into your Vista command prompt screen. I haven't tested it though.

share|improve this answer
DropCommand is exactly what i was looking for - its a bit glitchy in that you need to pause your mouse for a second before the command prompt window accepts the drag / drop, but it does the job. – Justin Oct 9 '09 at 17:27

It works fine for me, if it does not work for you, this is probably a UAC issue.

If you launch a regular command prompt, drag and drop works. The moment I elevate the command prompt, I loose this ability as explorer runs in a lower security context than the command prompt.

I have tried to elevate Explorer, but it does not seem to work and short of terminating explorer and relaunching as a admin process, I do not know of any other way around it. (and not sure that this would work)

share|improve this answer

You can simply open your folder, hold the Shift key, and select File in the menu bar - you'll have Open command window here.

For files, hold the Shift key and right click the file, select copy as path. Return to your Command Prompt, right click and "Paste".

Or simply by using DropCommand:

alt text

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .