Easiest way to copy filename to clipboard?

I can right-click the file tab and select Copy Path or Copy Reference and get the full drive path or the project-relative path, but I always have to chop the folders off to get just the file name. Is there some way to add this to the menu or create a keymap for it?

7 comments

Select a file in Project tool window and hit Ctrl+C - file name will be copied to clipboard

0

First off, selecting a file in PTWindow is an unnecessary click and secondly it doesn't work like you mentioned.

It stupidly yanks the current line in that file into the clipboard.

File Name Grabber Plugin serves this purpose grandly ! (I changed the shortcut to Alt+F)

This needs to be an inbuilt feature in IJ !

0

>it doesn't work like you mentioned. It stupidly yanks the current line in that file into the clipboard.

It does work. But you need to make sure that the Project view is focused, not the editor

0

I'm able to select just the filename by clicking on the file in the Project tab then using Ctrl+C (or right-click then Copy), but sometimes a file tab only opens from a search, which doesn't automatically select the file in the Project tab, meaning I have to double-click the parent folder in the breadcrumb trail above to see the file in the file tree.

I thought there was some hotkey to just select the file in the tree or copy the filename just from the open file tab.

0

No, unfortunately there's no such hotkey.

You can either use File Name Grabber Plugin or submit a feature request to implement this action.

0

I've just landed here looking for this same easy way to copy the actual filename by a key.

The shortest way I see to do it is.

ctrl + shift + s (open save as with selected filename)

ctrl + c (copy to clipboard)

esc (close the window)

For me it's fast enough 
Hope this helps someone ;)

 

 

 

0

Try this: Alt+Shift+S and Ctrl+C

Alt+Shift+S opens 'Save Context...' dialog with selected filename. Just copy it

0

Please sign in to leave a comment.