How to get the complete path to a file or folder on Windows 10
Paths are needed when you have to move a Command Prompt or PowerShell window to a different directory or when you need to open or run a file. They’re also used in scripts, and may even be needed to access files over the network. A file or folder path is basically an address that tells apps and other systems as well as your own operating system where it can find a file or folder. Here are three simple ways to get the complete path to a file or folder on Windows 10.
File Explorer location bar
The File Explorer location bar shows you which folder you’re currently in. By default, the path is shown in a more user-friendly and easy to read format but if you click inside the location bar, it will change to an actual path that you can copy to the clipboard. The shortcoming with this method is that it can only give you the path to the current folder. If you’re doing this for a file, you will have to manually copy the name and extension of the file and append it to the end of the path yourself. Make sure you copy and paste the file name so that there is less room for error.
File Explorer Ribbon
This method is the easiest of all methods on this list and it works for both files and folders. Open the folder that contains the file or folder that you want to get the complete path to. Select the item, and on the ribbon, select the Home tab. There’s a ‘Copy path’ button. Click it and the path to the item will be copied to your clipboard. The path will be enclosed in double-quotes so you can paste it straight into a script or terminal window.
File Explorer context menu
This method works more or less in the same way that the Copy Path button on the File Explorer ribbon does. Open the folder with the file or folder that you want to copy the path for resides in. Hold down the Shift key, and right-click the item. The context menu will have a ‘Copy as path’ option. Click it and the complete path to the file or folder, enclosed in double-quotes will be copied to the clipboard.
The only shortcoming with this method is that you might forget which modifier key to hold down to get this option in the context menu. Beyond that, it’s as easy as clicking the Copy Path button. If you prefer to use the keyboard to navigate most things, you will likely prefer the context menu method over the button.