Friday, March 7, 2008

"Copy To..." and "Move To..." options in Explorer context menu

For copying and moving files, we need to go to the target folder to paste the selected item. This tweak allows you to right click on any file or folder in Windows Explorer and use the Browse for Folder dialog to choose the destination folder. Check the screenshot given below.

Warning: If you don't know exactly what you are doing, registry editing is dangerous. Always take the backup of your registry before editing.

As the first step, we need to add the Copy To and Move To options to the Explorer context menu, for all Files.

Click on Start -> Run, type Regedit and click OK to open up the registry editor. Select the hive that is given below.

HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers

Right click the ContextMenuHandlers key and choose New -> Key. Name the new key as Copy To. Also, create one more key named Move To. Now select the Copy To key and in the right hand pane, double click on Default. Enter the CLSID that is given as the value data.

{C2FBB630-2971-11d1-A18C-00C04FD75D13}

Next, select the Move To key and in the right hand pane set the Default value to:

{C2FBB631-2971-11d1-A18C-00C04FD75D13}

This now takes care of the copy and move options for the right click context menu of all your files. If you do little bit of digging, you can see that the CLSID {C2FBB630-2971-11d1-A18C-00C04FD75D13} represents Microsoft CopyTo Service and the CLISD {C2FBB631-2971-11d1-A18C-00C04FD75D13} represents Microsoft MoveTo Service. We just created the context menu handlers for these services.

The next step is to add Copy To and Move To to directories. The procedure is same as that for the files, but at a different key. In the registry editor, move to the following hive.

HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers

Right click ContextMenuHandlers and create two new keys: Copy To and Move To. Left click on Copy To and set {C2FBB630-2971-11d1-A18C-00C04FD75D13} as the value for Default. Similarly, click on Move To and set {C2FBB631-2971-11d1-A18C-00C04FD75D13} as value for Default. This is similar to what we have done for files. Exit the registry and it is done.

Now, whenever you click on a file or folder, the Copy To... and Move To... options should appear, as shown in the above screenshot.

No comments: