How to Create a Context Menu Item to Copy a List of Files to the Clipboard in Windows 7 or Vista or XP

Posted: Jul 07, 2010 |Comments: 0 |

Have you ever needed to create a list of files in a directory? Here I will show you a trick--just need you right-click on or in any folder and copy a list of the files to the clipboard rather than use a command (really trouble) from the prompt to pipe the directory listing into a file. Now lets take a look at how to create a context menu item to copy a list of files to the clipboard Windows 7 or Vista or XP.

Using the Menu Item

Firstly, you can hold down Shift and right-click inside any folder (including the Desktop), and you'll see the new "Copy List to Clipboard" item.

9041416e-08c0-4735-8bb4-00d4ba20c778.png

Also you can hold down the shift key and right-click on a folder, where you'll also see the "Copy List to Clipboard" menu item as well:

286e3138-ee87-4d89-bef9-220078b816bb.png

You should have a list of files on the clipboard once you use the menu item.

85368353-d65a-46ed-8dfa-092531d832a7.png

You'll notice it's a simple file list, there's no file size or any other information displayed. You could modify the registry hack to eliminate the /b switch if you wanted to get the rest of the information.

How it Works

Actually here we are going to create a menu item that opens a command prompt, runs the dir /b command (for a clean directory listing), and pipes that into the clip.exe utility built into Windows 7 and Vista.

On the first step, we browse down to the following registry key:

HKEY_CLASSES_ROOT\Folder\shell

539476c5-ce31-49f9-8e57-36538d0dc02b.png

Now we created the copylist key, and then the command key underneath that. The default value for copylist is set to "Copy List to Clipboard", and then we set the default key for command to our command line:

cmd /c dir "%1″ /b /a:-d /o:n | clip

You could use the same thing from a command prompt or in your own scripts. Just replace %1 with the directory you are trying to get a listing of.

Note: If you are a Windows XP user, you can download clip.exe from Microsoft. Just save the file in the Windows directory and the rest of the hack should work for you.

Downloadable Registry Hack

Of course, if you think it is really trouble to add those keys manually, you can download, extract, and double-click on the CopyFileListClipboard.reg file to install. There's also a remove script included.

Welcome to http://www.newton360.com to get more information.

You can visit http://www.newton360.com/Detail/How-to-Create-a-Context-Menu-Item-to-Copy-a-List-of-Files-to-the-Clipboard-in-Windows-7-or-Vista-or-XP.html to read the original article.

You can get more Windows 7 tips, Windows 7 Wallpapers, Windows 7 Software from http://www.Newton360.com

Questions and Answers

Ask
200 Characters left
Rate this Article
  • 1
  • 2
  • 3
  • 4
  • 5
  • 0 vote(s)
    Feedback
    Print
    Re-Publish
    Source:  http://www.articlesbase.com/computers-articles/how-to-create-a-context-menu-item-to-copy-a-list-of-files-to-the-clipboard-in-windows-7-or-vista-or-xp-2788467.html

    Article Tags:

    copy files to clipboard

    ,

    create context menu

    ,

    copy files

    PCWatch

    Tell you how to create a context menu item to copy a text file to the clipboard in Windows 7 or Vista or XP--Newton360.com

    By: PCWatchl Computers> Operating Systemsl Jul 02, 2010 lViews: 166

    Windows Keyboard Shortcuts When I observe most colleagues and friends working on their PC are they mostly use the mouse, as they are unaware of the powerful Windows keyboard shortcuts that will make their lives so much easier. Some people might be aware of the keyboard shortcuts, but they are used to be working mostly with the mouse and old habits are hard to let go.

    By: jsolutionsl Computers> Laptopsl Oct 24, 2009
    Mr. Ashok Sharma

    You know of the obvious keyboard shortcuts, such as [Ctrl] + [V], and [Alt] + [Tab]. You probably don’t know them all, however. Experiment with them all -most of them which we’ve listed here - and see which ones you’d like to adopt!

    By: Mr. Ashok Sharmal Computersl Feb 16, 2010 lViews: 209
    Mr. Ashok Sharma

    MICROSOFT WORD: Several selected objects can be positioned at an equal distance from the margin by navigating to 'Print layout | Align'.

    By: Mr. Ashok Sharmal Computersl Feb 16, 2010

    Depending on your Internet connection may be able to get a lot more(or much less) than 1Mb in two seconds but to call this a post about apps meg but it is not so much fun! No, I really do not have to pay too much attention to the proposal followed t...

    By: blue73l Technologyl Sep 13, 2010

    An in depth look at the new MMORPG from Blizzard Entertainment known as Diablo III, a long awaited release for Diablo fans.

    By: swtorman90l Computersl Jun 01, 2012

    Most small businesses take advantage of computer technology, and it certainly can make things a lot easier for everyone within the business when you do so properly. Unfortunately, there are also a number of different problems that can occur as a result of the technology that you are using.

    By: Jesus Mattsonl Computersl May 31, 2012
    Steve Crown

    Copying ipod to computer is easy. For more information on how read this article.

    By: Steve Crownl Computersl May 28, 2012

    Online training software has found its place in almost all the offices and organizations. It can be used to train employees over the net

    By: Yaxley Halel Computersl May 28, 2012

    According to leading research carried out by Gartner, the number of PCs distributed throughout the first quarter of 2012 went up by 1.9% which was better than analysts predicted.

    By: Daniel Kiddl Computersl May 28, 2012
    PCWatch

    It is hardly to stay calm when your Internet Explorer downloads stop at 99% once again. Do you know what is the cause? There are many reasons leading to 99% download stop of Internet Explorer. Here we worked out several methods for your reference.

    By: PCWatchl Computers> Networksl Dec 27, 2010 lViews: 611
    PCWatch

    Internet Explorer is most often used browser worldwide. You must have been very familiar with IE8's basic features, but there are actually a lot of other features hidden in this browser. This article will tell you more on IE8, such as how to restore IE start button, how to resume downloads and how to fix IE without any tool.

    By: PCWatchl Computers> Networksl Dec 27, 2010
    PCWatch

    Internet virus will set a restoration key in registry boot options. Thus, even though you have removed the virus using antivirus software, viruses still exist after reboot. In order to remove them from the root, it is suggested to modify registry, therefore to block viruses launch from webpage, backdoor and files.

    By: PCWatchl Computers> Securityl Dec 27, 2010 lViews: 129
    PCWatch

    Over the course of your computer's lifetime, numerous junk files accumulate in hard disks. Those junk files are eating up disk space, weakening your computer performance and pulling down working efficiency. You may want to speed up PC, how? The 1st step is to identify junk files in our PC, and then remove them. This article will point out five large sources of junk files, so you could identify and delete them safely.

    By: PCWatchl Computers> Softwarel Dec 27, 2010 lViews: 161
    PCWatch

    Internet Security software and antivirus software may help us detect and remove security threats in most cases. But there are still situations that antivirus and security tools being disabled by Trojans or virus. At this moment, you shall find virus by yourself. This article points out 7 places virus usually hide in.

    By: PCWatchl Computers> Securityl Dec 27, 2010 lViews: 171

    Discuss this Article

    Author Box
    Articles Categories
    All Categories
    Quantcast