Drag and Drop Files and Folders to Auto-Complete a Command Line

Did you know that you can drag and drop files and folders to the command prompt or terminal? It simply auto-completes the path, so you don’t have to type the full thing out or navigate to the right folder. This works in Windows or Mac, and maybe elsewhere.

And it couldn’t be simpler. Just drag and drop a file or folder onto the command prompt, and next thing you know you’ll see the full path. It’s probably more useful if you had typed in a command previously, like the “cd” command to change a folder to. But whatever.

This also works on Mac OS X exactly the same way. Drag, drop, done.

And there you go.

Did we need this extra screenshot? Of course not.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.