Function to copy to clipboard only the selected filename(s)
Moderators: Hacker, petermad, Stefan2, white
Function to copy to clipboard only the selected filename(s)
I use a lot the function cm_CopyNamesToClip, but it copies filename and extension of selected files.
I'm wondering if it possible to add a command which it copies ONLY the filename (without extension). It is a function I would appreciate, I will use it a lot, and I guess another users too.
Something like "cm_CopyFilenameToClip"...
Thanks in advance!
I'm wondering if it possible to add a command which it copies ONLY the filename (without extension). It is a function I would appreciate, I will use it a lot, and I guess another users too.
Something like "cm_CopyFilenameToClip"...
Thanks in advance!
I Love Total Commander!
Can't imagine situation where such function may be useful. 
Currently you may use following trick:
1. Select file(s)
2. Open MRT (multi-rename tool, Ctrl+M)
3. Specify [N] as name template and empty extension template
4. Click small button with clipboard icon (to the right of case mode selection) and select 'Edit names...'. TC will open filelist in editor, you may copy names and close editor and MRT.
You may create special template and load it by hotkey via usercommand with MULTIRENAME command.

Currently you may use following trick:
1. Select file(s)
2. Open MRT (multi-rename tool, Ctrl+M)
3. Specify [N] as name template and empty extension template
4. Click small button with clipboard icon (to the right of case mode selection) and select 'Edit names...'. TC will open filelist in editor, you may copy names and close editor and MRT.
You may create special template and load it by hotkey via usercommand with MULTIRENAME command.
Hello, sidefx88.
Provided you are still using a 32-bit version of Total Commander on Windows, a little utility created by Lefteous a long time ago may be able to help you achieve your goal: List2Clipboard 1.02.
As you posted in the TC Suggestions sub-forum, I would like to support the idea that some such features should be implemented into Total Commander natively.
Kind regards,
Karl
Provided you are still using a 32-bit version of Total Commander on Windows, a little utility created by Lefteous a long time ago may be able to help you achieve your goal: List2Clipboard 1.02.
As you posted in the TC Suggestions sub-forum, I would like to support the idea that some such features should be implemented into Total Commander natively.

Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
One possible way if utilizing DOS
User.ini
or the same but directly as button
(note that "del" to "clip" should be one single line! But depending on your screen resolution it may be broken into two lines.)
Explanation:
"clip" is the WinXP clip.exe
%S is an TC parameter
The rest is pure dos.
Note: on first run there is an error msg because of the "DEL tctmp" command
while there is no tctmp existend yet, but you don't see it and it doesn't matter.
HTH?
User.ini
Code: Select all
[em_CopyBasenameToClip]
cmd=%comspec% /c
param=del %%tmp%%\tctmp & for /f "tokens=*" %%B in ('dir /b %S') do @echo %%~nB >> %%tmp%%\tctmp & type %%tmp%%\tctmp |clip
Code: Select all
TOTALCMD#BAR#DATA
%comspec% /c
del %%tmp%%\tctmp & for /f "tokens=*" %%B in ('dir /b %S') do @echo %%~nB >> %%tmp%%\tctmp & type %%tmp%%\tctmp |clip
WCMICONS.DLL
Copy base name only to clipboard
1
-1
Explanation:
"clip" is the WinXP clip.exe
%S is an TC parameter
Code: Select all
%S insert the names of all selected files into the command line.
Names containing spaces will be surrounded by double quotes.
Please note the maximum command line length of 32767 characters.
Note: on first run there is an error msg because of the "DEL tctmp" command
while there is no tctmp existend yet, but you don't see it and it doesn't matter.
HTH?
I would support new internal command with parameter string specifying which WDX fields to copy, just like in tooltips or custom columns. So, every copy would be satisfied!karlchen wrote:As you posted in the TC Suggestions sub-forum, I would like to support the idea that some such features should be implemented into Total Commander natively.
Code: Select all
cm_CopyDetailFields [=tc.name]
cm_CopyDetailFields [=tc.fullname]\t[=tc.versionstring]
cm_CopyDetailFields [=tc.fullname]\t[=exif.Width]x[=exif.Height]
etc.
Anyway TC is already able to build such strings since it does it in many other places.
Hello, MVV.
Actually, my idea, though not expressed explicitly, was along the line that the features which Lefteous addon List2Clip offers might be included in Total Commander.
The new internal command that you suggest might be more flexible, though I am not sure whether it covers all the string manipulations which Lefteous's list2clip can perform.
A hint why being able to manipulate strings got by the various copy names to clip functions may be helpful or even needed: copy path to clipboard - wine
Anyway, we are free to express wishes. We will learn whether any of them will be fulfilled one day in a far away future.
Kind regards,
Karl
Actually, my idea, though not expressed explicitly, was along the line that the features which Lefteous addon List2Clip offers might be included in Total Commander.
The new internal command that you suggest might be more flexible, though I am not sure whether it covers all the string manipulations which Lefteous's list2clip can perform.
A hint why being able to manipulate strings got by the various copy names to clip functions may be helpful or even needed: copy path to clipboard - wine
Anyway, we are free to express wishes. We will learn whether any of them will be fulfilled one day in a far away future.

Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Thanks for your tips! But they need intricated procedures or additional software. They're complex compared to a simple, native 'cm_CopyFilenameToClip' command I suggested 
I'd use this function a lot: select MP3 files and copy only the filename to create quick plain txt playlists (without the annoying MP3 extension).
Thanks!

I'd use this function a lot: select MP3 files and copy only the filename to create quick plain txt playlists (without the annoying MP3 extension).
Thanks!
I Love Total Commander!