Copy file name only

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

homunculus
Member
Member
Posts: 15
Joined: 2006 Jun 22, 20:41

Copy file name only

Post by homunculus »

I often need to copy and paste the file name only, without the path. I'm talking about long file names (30+ characters), not short ones I could easily type in myself.  :)  Right now, I tend to copy the full path with Alt-C, paste it in the text editor and then edit out the path. It would be great if x2 had a dedicated hotkey for copying the file name only. It looks like right now both Alt-C and Ctrl-Alt-C do the same thing, namely copy the full path. Could we remove the redundancy and have Alt-C copy the full path and Ctrl-Alt-C just the file name?
Cosmo
Gold Member
Gold Member
Posts: 465
Joined: 2007 Apr 17, 11:09

Post by Cosmo »

I support this idea.

Nevertheless you can use SendToToys. It provides (besides others) an additional send-to target, where you can place the filename into the clipboard. This is configurable. So I personally use the x2-built-in command alt-c for copying the pathname and this send-to-target for the filename without the path.
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

F2, shift+end, ctrl+C, ESC, easy!
Robert2
Gold Member
Gold Member
Posts: 705
Joined: 2004 Jun 17, 15:39

Post by Robert2 »

Why not simply use "Ctrl+P"?
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Nice one, Robert2. :)
Being a (primarily) Details view user, I didn't think of suggesting that because it also copies all the columns.  :(
But ... in any other view, Ctrl+P copies just the selected item name(s). :thumbup:
homunculus
Member
Member
Posts: 15
Joined: 2006 Jun 22, 20:41

Post by homunculus »

Why not simply use "Ctrl+P"?
Because I use the Details view and Ctrl-P gives me headers and file info. The pasted content needs even more editing than Alt-C.
homunculus
Member
Member
Posts: 15
Joined: 2006 Jun 22, 20:41

Post by homunculus »

nikos wrote:F2, shift+end, ctrl+C, ESC, easy!
About as easy as going from France to Spain through China. Yes, there are more-or-less inane workarounds, but splitting two redundant hotkeys (a bad idea to begin with), as proposed, can't be that hard.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Given that we prefer Details view, the fewest keystrokes method I see for copying a single item name to the clipboard is:
Ctrl+F2, Ctrl+C, Esc

And there is a registry tweak (or use x2 Settings Editor) to set F2 to select the entire itemname, including the extension. Using that setting would further reduce the keystrokes to: F2, Ctrl+C, Esc
(... but still not as simple as your initial suggestion/request at the top if the thread to change the Ctrl+Alt+C usage so it copies just the itemname(s) to the clipboard. :shrug: )
User avatar
johngalt
Gold Member
Gold Member
Posts: 654
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock

Post by johngalt »

I thought about it and thought about it some more and I support the idea - if copying the filename can be implemented in a future build then CTRL + ALT + C would make a good shortcut key for it as well.

Add my name to the list of people requesting this feature.
Image
bst
New Member
Posts: 7
Joined: 2008 May 15, 21:38
Location: Germany

Post by bst »

Hi,

ALT + C and CTRL + ALT + C are not identical.

ALT + C copies item names (including paths) separated by linefeed

CTRL + ALT + C copies item names (including paths) in a comma-separated list

FWIW, you could use here:

Ninotech Path Copy http://home.worldonline.dk/ninotech/freeutil.htm
use menu: Copy Long Name

putclip from cygwin http://www.cygwin.com/  or gclip from http://unxutils.sourceforge.net/
$echo $N | putclip

CopyToClip from http://mc-computing.com/Languages/CopyToClipboard.htm
> CopyToClip $N

Or use AutoHotkey or similar and write a small script.

cu, Bernd
slsides
Member
Member
Posts: 11
Joined: 2008 Feb 22, 14:29

Post by slsides »

the file manager i used to use (powerdesk) did allow copy filename as well as copy path.  i liked the feature.
User avatar
johngalt
Gold Member
Gold Member
Posts: 654
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock

Post by johngalt »

good point bst - I only tried it with one file so it looked the same - with multiple files the difference is obvious.

Adding SHIFT Into the mix copies the 8.3 file paths in a similar fashion.
Image
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: Copy file name only

Post by becritical »

Is there a way to NOW copy only filename without using other extensions?
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Copy file name only

Post by Kilmatead »

If you mean only copy the filename itself (not including the full path), when sorting by the Name column, <Ctrl+Alt+P> will do that. (Indeed, it will only copy whatever information is in the column which is currently sorted, so it's flexible that way.)

If you do this quite often, want to avoid the Name-sorting requirement, and/or would prefer something more obvious like a toolbar-button, a script (for a user-command) could be easily written. :shrug:

Or, if you mean the entire filepath including the name, as mentioned above, simply <Alt+C> will do it. Alternatively, hold <Shift> while Right-Clicking and there's a shell entry for "Copy as path" (this is a standard windows thing).