When using Microsoft Windows, there are times when we need to find the entire path to a file’s exact ‘location’ on the hard drive (i.e. the file’s pathname).
For example, some of the tips I post on this blog require entering a file’s full pathname into a text field of some sort.
Back in the Stone Age of personal computing when the DOS operating system ruled the roost, determining a file’s pathname was easy….
Since you navigated to a file from the command line, once you found the file you were looking for, it’s full path (minus the filename itself) was displayed right on the screen. All you had to do at that point was append the filename onto the end, and you were done!
But with Windows, the full path to a file is rarely displayed at all.
We humans can open File Explorer and navigate to a file with a few mouse clicks, but a computer program cannot. And if an application (or a computer tip) asks for the full path to a file, how exactly do you determine what it is?
Luckily, it’s quite easy to copy a file’s full pathname to the windows Clipboard, and after that you can paste it wherever you need it. Here’s how:
1 – Press the Windows+E key combination to open File Explorer.
2 – Using your mouse, navigate to the folder containing the file you need the path to.
3 – Press and hold the Shift key, then right-click on the filename.
4 – Click Copy as path.
Congrats! The pathname for the file in question is now contained in the Windows Clipboard.
5 – Paste the pathname you just copied to the clipboard into the document or text field that you need to place it in.
Important: Be sure to remove the quotation marks at both the beginning and end of the pathname.
That’s all there is to it. Now you know how to copy the full pathname for any file on any drive to the clipboard and paste it into whatever document, web form, application or utility that might need it.