How to add a "duplicate this folder" in windows file explorer context menu?

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

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.

Edit

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.