is there an easy way, to add an item to windows explorer's context menu, i.e., when right click on a folder "X", there's a new item "duplicate this folder", such that after clicking, a copy "X - Copy" will be created?


Adding second answer since it describes different approach.

Custom context menu item for folders can be configured via Windows Registry:

  1. Open Registry editor: hit WinKey+R, type "regedit" and press enter
  2. Navigate to HKEY_CLASSES_ROOT\Directory\shell if you are administrator, HKEY_CURRENT_USER\Software\Classes\directory\shell otherwise
  3. Add menu item: create new key under "shell". You can name it "duplicate this folder" directly or give arbitrary name and set default value to "duplicate this folder" for this key.
  4. Assign functionality: create key named "command" inside new key. Set "command" key default value to cmd.exe /c robocopy "%1" "%1 - copy" /e
  • thx nnovich-OK ! both approach , up to the preference! – athos Mar 26 '17 at 7:00
  • Does this work for single files? If not, how do I modify it to do so? – Marshall Eubanks Jun 27 '17 at 12:30
  • 1
    No, context menu is added for folders only. Adding menu item for any file should be done in HKEY_CURRENT_USER\Software\Classes*\shell or HKEY_CLASSES_ROOT*\shell for admin. Plus you need to correct command since current one expects directory as input. – nnovich-OK Jun 27 '17 at 13:07

The easiest way I know is to add batch/powershell script with desired functionality into "SendTo" special directory. So on the right click you can navigate to "SendTo" submenu and choose script. Script will be called with the first parameter of full folder path, the rest is up to you.

To access SendTo directory, hit WinKey+R, type "shell:sendto" and hit enter.


If you want menu item to be more user friendly, put script shortcut into SendTo instead of script itself. In this case, you can give shortcut any name and any icon, giving it more convenient look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.