If your work requires extensive use of the Windows command line, this is a useful trick to improve your efficiency. When you drag and drop files to the command line window, it automatically fills in the complete path of the file.

Note that the existing text also remains intact, so if you drag and drop after typing “cd “, the file or folder name is appended to it – “cd C:\test.txt” for example.
This trick works on all versions of Windows – from 95 to XP, but not on Windows Vista. For Vista, you could try out this simple program to enable this behaviour.
See some more Command Line Tricks.
Find this article at: http://www.labnol.org/software/tutorials/copy-paste-file-names-in-command-prompt/7789/
Tags: command line, feature, windows, Tips, Tricks, Tutorials

Reader Comments
Another way is to hit the “tab” key in command line to autofill file or folder name. You can also type first few characters and then hit tab key to get file names starting with those few characters.
Written by Satbir Singh on 03.05.09
well i had xp and i knew this..well at present i use windows 7 can u suggest something for that
Written by shankar on 03.05.09
tab key is not working for me
Written by ajay on 03.05.09
Tab key works when you are searching for the file in the path you are currently working. If not then you have to manually go to the path first and then press tab multiple times. which means you have to know which directory your file resides. the technique given by Amit is simpler.
Written by TechMata on 03.06.09