Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

3 Answers 3

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.

EDIT
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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.