Copy full file path in Windows XP

11

5

I've often the need to copy the full file path of a file or directory from the file explorer in Windows - is there any easy way of doing this ?

nos

Posted 2009-08-21T08:56:44.293

Reputation: 3 699

Here is a hotkey solution for Windows XP. AutoHotkey is used – Mikhail V. – 2015-09-05T21:31:03.627

Interesting requirement. In fact, I have similar question for Visual Source Safe. I need to share the file path in VSS to other users through email. – kamleshrao – 2009-08-21T09:10:46.213

@kamleshrao in the sourcesafe explorer, just right click a file/folder ->Properties, and you can select and copy the path from that dialog. – nos – 2012-02-09T08:10:48.603

Answers

10

In explorer go to tools - folder options and on the view tab choose display full path in the address bar. You can then copy and paste from the address bar.

Col

Posted 2009-08-21T08:56:44.293

Reputation: 6 995

Out of interest, what shows when this is not on? Cos I've only ever seen the full path in the address bar on XP. And Vista for that matter (though you need to click in it first to see it). – DisgruntledGoat – 2009-08-21T11:19:05.613

Just the current folder – Col – 2009-08-21T11:51:20.383

5As far as I can tell, this doesn't work if you need the full path of a file. Only the path of the currently open folder can be copied in this way. – wcoenen – 2009-10-12T11:24:22.890

True, you'd need to copy the filename separately. As far as I know it's not possible to do the whole thing without installing third party utilities. – Col – 2009-10-12T12:44:46.603

17

You can drag and drop the file on the run dialog, or on a command prompt, this will put the full path at the cursor position.

Alternatively, you can install something like Ninotech Path Copy so you have it in your default explorer context menu:

Ninotech Path Copy is a shell extension for Windows 95, 98, NT4, 2000, and XP that enables to copy the path of a file or directory to the Clipboard. You can then paste the path in to your document, e-mail, etc. You copy the path of a file or directory by right-clicking it in the Windows Explorer and choosing Copy Path from the context menu. The context menu then offers nine standard ways of copying the path, in addition to the user defined copying methods that you create yourself:

Of course, what Col suggests is maybe even easier?

fretje

Posted 2009-08-21T08:56:44.293

Reputation: 10 524

PathCopy was an awesome extension! It's too bad it no longer works fro me in 7x64... i think it's a 32bit/64bit problem. :( But for XP it is a great pick! – eidylon – 2010-03-20T03:42:29.923

7@eidylon for Win7, you can hold Shift while right clicking on the file, and a "Copy as path" menu item appears. – nos – 2012-02-09T08:08:46.297

7

Copy and paste this text into Notepad and save with a .reg extension:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Allfilesystemobjects\shell\CopyPath]
@="Copy as Path"
"Extended"=""

[HKEY_CLASSES_ROOT\Allfilesystemobjects\shell\CopyPath\command]
@=hex(2):25,00,63,00,6f,00,6d,00,73,00,70,00,65,00,63,00,25,00,20,00,2f,00,63,\
  00,20,00,65,00,63,00,68,00,6f,00,20,00,22,00,25,00,31,00,22,00,7c,00,63,00,\
  6c,00,69,00,70,00,2e,00,65,00,78,00,65,00,00,00

Double click the .reg file, add to the registry, then log off and back on again. Download Clip.exe from Microsoft's FTP site, and copy it to C:\Windows\System32. Now if you hold SHIFT and right-click on a file, you'll see the Copy as Path submenu item.

Blam

Posted 2009-08-21T08:56:44.293

Reputation: 246

3

Here is another solution for people who are in locked down corporate environments as it doesn't require an external executable or access to the registry.

Click on Start -> Run and then enter shell:sendto and press Enter. This will open up a folder. Create a file called Clipboard (full path and filename).vbs and put the following code into it:

Option Explicit
If WScript.Arguments.Count = 0 Then WScript.Quit
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject")
Dim sFile : sFile = fso.GetAbsolutePathName(WScript.Arguments(0))
Dim sDrive : sDrive = fso.GetDriveName(WScript.Arguments(0))
Dim sMap : sMap = GetMappedDrive(sDrive)
If sMap <> "" And sDrive <> sMap Then sFile = Replace(sFile, sDrive, sMap)
Call CopyToClipboard(sFile)
Msgbox "The following path has been copied to the clipboard:" & VbCrLf & VbCrLf & sFile, 0 + 64 
Set fso = Nothing
WScript.Quit

Function GetMappedDrive(sDrive)
    Dim wshNetwork : Set wshNetwork = CreateObject("WScript.Network")
    Dim oDrives : Set oDrives = wshNetwork.EnumNetworkDrives
    Dim i
    For i = 0 to oDrives.Count - 1 Step 2
        If UCase(oDrives.Item(i)) = UCase(sDrive) Then
            GetMappedDrive = oDrives.Item(i+1)
            Exit For
        End If
    Next
    Set oDrives = Nothing
    Set wshNetwork = Nothing
End Function

Function CopyToClipboard(sText)
    ' Create temporary text file to avoid IE clipboard warnings
    Dim sTemp : sTemp = fso.GetSpecialFolder(2) & "\" & fso.GetTempName
    Dim oFile : Set oFile = fso.CreateTextFile(sTemp, True)
    oFile.Write "This file can be safely deleted"
    oFile.Close
    Set oFile = Nothing
    ' Start Internet Explorer in the local zone
    Dim oIE : Set oIE = CreateObject("InternetExplorer.Application")
    oIE.Visible = 0
    oIE.Navigate2 sTemp
    Do
        WScript.Sleep 100
    Loop Until oIE.Document.ReadyState = "complete"
    ' Copy contents to clipboard
    oIE.Document.ParentWindow.ClipboardData.SetData "text", sText
    ' Clean up
    fso.DeleteFile sTemp
    Set oIE = Nothing
    Set fso = Nothing
End Function

When you want to get the full path of a file or folder, right click on the item and then select Send to -> Clipboard (full path and filename).vbs.

A pop-up will appear telling you the full path and it will also be copied to the clipboard ready for pasting into another application or document.

Richard

Posted 2009-08-21T08:56:44.293

Reputation: 4 197

2

Right click, choose "open with", and open it with whatever browser you use. Then you can copy the full path name from the address bar

Connexx

Posted 2009-08-21T08:56:44.293

Reputation: 11

2

Use Copy Path. It allows you to right-click on a drive or file system object and copy the path of the file to the clipboard.

This extension is intended to make the task of finding and sharing the UNC path for a mapped drive easier as I often need to find this information from colleagues or pass this information to colleagues. I created this utility to make it simpler.

This is a Windows Explorer shell extension that will allow you to right click on a drive or file system object and copy the path of the file to the clipbpoard. If the drive is a mapped drive or the file system object exits on a mapped drive it will resolve the full UNC path.

Mee

Posted 2009-08-21T08:56:44.293

Reputation: 11

2

Perhaps I misunderstood the question, but it seems to me that the other answers help only in displaying the name in the window title (the blue stripe at the top).

To get the address line, simply choose: View > Toolbars, and make sure the Address Line (or something similar, I don't have the English version installed) is checked. In case it is not - click it to make it checked.

Nadav

Posted 2009-08-21T08:56:44.293

Reputation: 21

2

Download the Get Path plugin from teaching.droidsdk.com, which I'm affiliated with.

This is a plugin for Windows; you can have the path of each file copied in the clipboard, ready for paste anywhere with just one click on the right click menu entry named “Get Path”.

Meka

Posted 2009-08-21T08:56:44.293

Reputation: 21

1

Create a file named filepath.bat in the following folder:

C:\Documents and Settings\your_user_name\SendTo

Add the following to the .bat file:

@dir %1 /b /s

@pause

To obtain the full file path, right click on a file and select 'Send to' from the context menu. filepath.bat will show up as an option. Select it, and a Command Prompt showing the full path of the file will appear.

Click on the [C:] icon in the upper left of the Command Prompt titlebar and select 'Properties'. Under the 'Options' tab, check the 'Quick Edit Mode'. Then check "Modify shortcut that started this window" (it is only necessary to do this one time). Now, any time you need to know the full path of a file, right click it, select 'Send to', then filepath.bat. To copy the path, drag with the left mouse button over the link then right click. The full path can then be Ctrl + V pasted anywhere.

It seems like a burden, but once it's set up it's reasonably quick to use.

user31710

Posted 2009-08-21T08:56:44.293

Reputation:

1

You might want to check out FileMenuTools from Lopesoft.

guillermooo

Posted 2009-08-21T08:56:44.293

Reputation: 2 093

Good utility, that does much more than copy path. Which can be a good thing (it is!) or not (if you just want this feature). – PhiLho – 2011-03-29T09:28:48.547

1

You could right click the file or folder and go to Properties. There, you have both location and file or folder name.

alex

Posted 2009-08-21T08:56:44.293

Reputation: 16 172

It does if you click the text next to "Object Name" in the security tab. I actually think this is the best answer so far. – StatsStudent – 2019-10-28T21:31:48.567

This doesn't return the full path of the file, just the name and directory separately – ChrisF – 2009-08-21T11:18:09.157

1

You can install this small explorer extension. It adds a context menu entry that does what you want. Pretty much the same thing as the Ninotech Path Copy, but it comes with an installer.

drby

Posted 2009-08-21T08:56:44.293

Reputation: 325

0

Grab Path in the Synesis Shell Extensions is excellent, full of useful options like copy in 8.3 format or in Unix format (great to paste in a string in C or Java program, for example).

Alas, it doesn't work in Win7 and seems abandoned (last update in 2006!). But still great on XP, I keep it along with the FileMenu Tools recommended above (which works on Win7), because of the options.

For the record, even if the question is explicitly for WinXP, I thought it can be interesting to share a trick I just discovered today: in Win7, just Shift+right-click to get a copy path option (why it is hidden is beyond me...).

PhiLho

Posted 2009-08-21T08:56:44.293

Reputation: 271

0

Full path including filename. (xp at least)

In xp file browser place "\" at the end of the folder name and a drop list will appear with all the files in that folder. Use arrow up & down keys to navigate to file of choice, highlighted file is placed in address bar, user left arrow key to swipe and copy path.

Folder tools must be checked that "display full path in the address bar".

Benghazi

Posted 2009-08-21T08:56:44.293

Reputation: 11

0

Here's a variation on previous solutions. Probably the simplest way for XP, and useful if you're in a locked down corporate environment as no registry entries required.

  1. Download clip.exe from the Microsoft Windows 98 Resource Kit FTP site and save it your System32 folder (usually C:\WINDOWS\System32), or somewhere in your PATH.

  2. Copy and paste the line below into a text editor, and save the file as Copy path to clipboard.bat in C:\Documents and Settings\[user_name]\SendTo

    @echo %~dpnx1|clip.exe

  3. To copy the full file path, right click on a file and select 'Send to' from the context menu. Copy path to clipboard.bat will show up as an option. Left-click it and paste away.

Jimadine

Posted 2009-08-21T08:56:44.293

Reputation: 832

In Windows 7the download of clip.exe is no longer necessary. Clip.exe is now part of Windows. The SendTo folder can now be found under "C:\Users...\AppData\Roaming\Microsoft\Windows\SendTo". Store a shortcut rather than the .bat file itself in the folder. This allows you to select a nice(r) name and to set the window properties of the command to "hidden". Moreover, copy path is now accessible in the Explorer context menu, if you press the <shift> key. – Axel Kemper – 2014-03-16T23:27:35.213

The original questioner was asking about Windows XP, not Windows 7, so this information is not relevant to the original question. – Jimadine – 2014-03-17T10:57:53.950

0

easiest i've found (+ many other uses)

Path Copy Copy - Home

another is CopyFilenames - Copy filenames to the Windows clipboard.

CopyFilenames i find useful because it can add file size to the end of the file name.

bert

Posted 2009-08-21T08:56:44.293

Reputation: 1

2Can you explain how to use these in a way that answers the OP's question? – Cfinley – 2015-05-15T19:07:13.100