Copy file name only
Moderators: fgagnon, nikos, Site Mods
-
homunculus
- Member

- Posts: 15
- Joined: 2006 Jun 22, 20:41
Copy file name only
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

- Posts: 465
- Joined: 2007 Apr 17, 11:09
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.
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.
-
nikos
- Site Admin

- Posts: 16402
- Joined: 2002 Feb 07, 15:57
- Location: UK
-
fgagnon
- Site Admin

- Posts: 3737
- Joined: 2003 Sep 08, 19:56
- Location: Springfield
-
homunculus
- Member

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

- Posts: 15
- Joined: 2006 Jun 22, 20:41
-
fgagnon
- Site Admin

- Posts: 3737
- Joined: 2003 Sep 08, 19:56
- Location: Springfield
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.
)
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.
-
johngalt
- Gold Member

- Posts: 654
- Joined: 2008 Feb 10, 19:41
- Location: 3rd Rock
-
bst
- New Member
- Posts: 7
- Joined: 2008 May 15, 21:38
- Location: Germany
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
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

- Posts: 11
- Joined: 2008 Feb 22, 14:29
-
johngalt
- Gold Member

- Posts: 654
- Joined: 2008 Feb 10, 19:41
- Location: 3rd Rock
-
becritical
- Member

- Posts: 24
- Joined: 2016 Aug 12, 16:31
Re: Copy file name only
Is there a way to NOW copy only filename without using other extensions?
-
Kilmatead
- Platinum Member

- Posts: 4879
- Joined: 2008 Sep 30, 06:52
- Location: Baile Átha Cliath
Re: Copy file name only
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.
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).
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.
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).
