I often want to send the path of a file by email, either of local file or one on a network share. Sadly, Microsoft didn’t think of this use case, at least up to Windows XP, so I wrote this little VBS script that does exactly this (under Vista, just press SHIFT+Right click on the file, Copy as path).
If the path is within a drive that is mapped to a network resource, then the script will also replace the letter by the corresponding absolute location. The reason is that your colleagues may not use the same mapping as you do, making thereby a link to “X:…” useless.
Installation instructions :
- Download this file
- Save it as
C:Documents and SettingsUSERNAMESendToCopyLocation.vbs(replacing USERNAME by your Windows login)
- Right click on a file, select Send To, CopyLocation.vbs :
- Wait a few seconds (especially the first time after a reboot)
- Paste anywhere you want
Notes for the installation :
- the SendTo directory is hidden by default in Windows, so enter the path either manually, or change your settings to show hidden files and dirs
- It’s important to change the file name extension to .vbs
- If the path is not copied to the clipboard, open the file with the notepad, and replace CopyToClipboardIe by
No idea which Internet Explorer setting prohibits to copy to the clipboard on some systems. Of course, the workaround requires MS Word installed
Keywords : windows explorer copy absolute path clipboard vbs script unc letter drive network