Click here to Skip to main content
13,766,878 members
Click here to Skip to main content
Add your own
alternative version


46 bookmarked
Posted 7 Apr 2000
Licenced CPOL

Copy Location Shell Extension

, 14 Apr 2000
Rate this:
Please Sign up or sign in to vote.
This shell extension adds the ability to copy file and folder names from the Windows Explorer to the clipboard.

Updated software page and download links here




This shell extension adds the ability to copy file and folder names from the Windows Explorer window to the clipboard. Simply select the file(s) whose name you want to copy, right-click and select "Copy File Path" or "Copy File Name" from the context menu. Then paste to any editor.

Copy File Path - copies the entire path to the file.
Copy File Name - copies only the file name without the folder.

This utility is inspired by Michael Dunn's article The Complete Idiot's Guide to Writing Shell Extensions. Thanks Michael!



  1. Unzip to the folder where you want to install the utility (e.g., C:\Winnt).
  2. Go to the installation folder and double-click on Install.bat.
  3. If you wish, you can delete Install.bat.

Install.bat registers CopyLocation.dll in the system.

Alternatively you can:

  1. Copy CopyLocation.dll to the installation folder (e.g., C:\Winnt).
  2. From the Start Menu select Run...
  3. Type "regsvr32.exe C:\Winnt\CopyLocation.dll" and press OK (specify the exact installation folder)

Install using Run... command

To uninstall the shell extension:

  1. From the Start Menu select Run...
  2. Type "regsvr32.exe /u C:\Winnt\CopyLocation.dll" and press OK (specify the exact installation folder)
  3. Delete CopyLocation.dll from the installation folder.


Possible problems

This shell extension has been tested on Windows 98 and on NT 4.0 with Internet Explorer 5.0. I don't know how it will function under other operating systems. Please write to me if you encounter any problems.


Contacting me

Bug reports, requests, features? my website is here.
Go to my website for latest updates about this utility and other tools I made.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
Israel Israel
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralThanks! Pin
jpascuet4-Apr-08 6:32
memberjpascuet4-Apr-08 6:32 
GeneralRe: Thanks! Pin
IicFox18-Oct-09 22:54
memberIicFox18-Oct-09 22:54 
QuestionCan you paste multiple attributes into a spreadsheet? Pin
DataSpa21-Aug-07 13:39
memberDataSpa21-Aug-07 13:39 
GeneralRegistration in Vista Ultimate Pin
cmlang423-Jul-07 17:59
membercmlang423-Jul-07 17:59 
GeneralRe: Registration in Vista Ultimate Pin
grebulon3-Jul-07 22:24
membergrebulon3-Jul-07 22:24 
GeneralRe: Registration in Vista Ultimate Pin
TedToal20-Oct-08 10:29
memberTedToal20-Oct-08 10:29 
GeneralRe: Registration in Vista Ultimate Pin
grebulon20-Oct-08 14:51
membergrebulon20-Oct-08 14:51 
QuestionCopy Location Shell Extension functionality [modified] Pin
hackeronte de bugger4-May-07 7:18
memberhackeronte de bugger4-May-07 7:18 
QuestionCombine filename and location Pin
j0ha|\|30-Aug-06 23:00
memberj0ha|\|30-Aug-06 23:00 
AnswerRe: Combine filename and location Pin
grebulon30-Aug-06 23:09
membergrebulon30-Aug-06 23:09 
GeneralExcellent Pin
Stober23-Aug-05 10:07
memberStober23-Aug-05 10:07 
GeneralUrgent. Pin
Anonymous9-Feb-05 12:12
memberAnonymous9-Feb-05 12:12 
GeneralNeed Help. Pin
Anonymous29-Jan-05 12:48
memberAnonymous29-Jan-05 12:48 
GeneralGet *.lnk File Path Pin
Miss Fress5-Apr-04 19:02
memberMiss Fress5-Apr-04 19:02 
QuestionRe: Get *.lnk File Path Pin
Inocentric4-Dec-05 3:04
groupInocentric4-Dec-05 3:04 
GeneralDoesn't copy whole text Pin
Bard25-Feb-03 6:31
memberBard25-Feb-03 6:31 
GeneralRe: Doesn't copy whole text Pin
Mandar D. Sahasrabuddhe15-Mar-03 3:22
memberMandar D. Sahasrabuddhe15-Mar-03 3:22 
GeneralRe: Doesn't copy whole text Pin
Bard16-Mar-03 22:47
memberBard16-Mar-03 22:47 
Hi Mandar,

I set the project up to a debug configuration, set a breakpiont and press F10. In the upcoming dialog asking for the program to attach the DLL to, I search for Explorer.exe in C:\winnt and press OK.
Now I press F5 and VS begins to start the Explorer and runs it. When I rightclick a file and I set my breakpoint right VS reaches the breakpoint and I can step through the code.
To the problem with the one character...I don't pass the result of GlobalLock(...) to the function working with the string but the original pointer. I don't know what it's good or bad for, but it works.

GeneralSolution to "Doesn't copy whole text Pin
Mandar D. Sahasrabuddhe15-Mar-03 21:44
memberMandar D. Sahasrabuddhe15-Mar-03 21:44 
QuestionHow to Copy/Move Temporary Internet File? Pin
Stuard20-Sep-02 10:33
memberStuard20-Sep-02 10:33 
AnswerRe: No Pin
Tim Smith20-Sep-02 10:41
memberTim Smith20-Sep-02 10:41 
GeneralNice idea! Pin
Alvaro Mendez16-Aug-01 7:16
memberAlvaro Mendez16-Aug-01 7:16 
GeneralTiny Update (compilation problem) Pin
Itay Szekely8-Apr-00 23:56
sussItay Szekely8-Apr-00 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01-2016 | 2.8.181114.1 | Last Updated 15 Apr 2000
Article Copyright 2000 by grebulon
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid