How to add "Duplicate" to project file context menu?

For Clion (2020.2) (and PyCharm?)  Can I add a behavior/function "Duplicate" to the right-click context menu which DUPLICATES the highlighted file, adding some unique suffix like macOS finder does when you do the same and click "Duplicate" (Replicates file, adds "_copy" to the filename)?


Can I launch a script file that accomplishes this operation?


1 comment
Comment actions Permalink


I know it is a bit late, but I also missed this feature for years and discovered how to achieve it just today :)

First, record a macro (Edit -> Macros -> Start Macro Recording).

Then, record a copy - paste sequence (I think you can just hit ctrl/cmd+c, ctrl/cmd+v or click on any file, then pick Edit -> Copy, Edit -> Paste).

Then, save the macro (Edit -> Macros -> Stop Macro Recording) and give it a name, e.g. "Duplicate".

Finally, go to Preferences -> Appearance & Behavior -> Menus and Toolbars (see:, find "Solution View Popup Menu", then pick the place where you want to add the Duplicate entry (you have to select something, otherwise the add button will be grayed), click + to add a new item and select your macro :)

Btw. it's easier than it sounds ;)


Please sign in to leave a comment.