There are times when you need to paste a file or folder path to the Windows command prompt. You might be doing several mouse clicks or typing for this simple task. It is possible to optimize this simple operation and reduce the amount of clicks.
In general, you may frequently need:
- to copy the full path to a file using the Ribbon or context menu in File Explorer in Windows 8.
- and to right click the command prompt's window title and choose Edit -> paste command from its context menu or right click the black input area and choose the Paste command from there. Even if you have "Quick Edit" mode, where a simple right click pastes the clipboard's contents, there is a faster way.
Not so many people seem to be aware that it is possible to drag the desired file or folder directly to the command prompt window to paste it's path into the command prompt. This is extremely handy if you need to paste the path of the several files or repeat this task for many objects one by one.
Just select some file or folder in File Explorer and drag it to the opened command prompt. In the example below, I did that with the "Program Files" folder:
Note: In case the drag and drop to the Windows command prompt does not work, it may be because of the fact that you opened an elevated command prompt. Elevated command prompt runs at a higher integrity level and lower integrity processes can't communicate with it. In that case, you will not be able to drop files there from File Explorer. To get it working, you need to run your file manager app also elevated. In that case, you can use some alternative file manager tool, or make Windows File Explorer to run as administrator on Windows 8.1, Windows 8 and Windows 7.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!