Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the path to a file in Windows 10?

Tags:

windows-10

I frequently need to copy the file path of an object in Windows, so that I can paste it into a tool like the command line or Powershell. How can I quickly do this, without having to go to an object's properties and copying the path from there?

like image 767
Dave Voyles Avatar asked Sep 14 '15 20:09

Dave Voyles


2 Answers

Pressing Shift + Right Click will bring up an additional item in the context menu for you, labeled "Copy as path".

This will return the file path as a string, and it will be saved to your clipboard.

enter image description here

like image 88
Dave Voyles Avatar answered Nov 05 '22 08:11

Dave Voyles


I use the open source tool Path Copy Copy, as this offers the ability to copy the path in multiple formats:

  • UNC for a full network path,
  • or a fully custom defined format, for example escaped backslashes and path enclosed in "".

Image below shows the default Path Copy Copy context menu:

enter image description here

like image 26
Lucademicus Avatar answered Nov 05 '22 07:11

Lucademicus