Copy selected file name without the extension to Clipboard
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 84
- Joined: 2004-03-14, 22:22 UTC
Copy selected file name without the extension to Clipboard
Good day.
We have the option to rename a file, without the ectension.
Is it also possible to select the file without the extension??
TIA
Andre Linoge
We have the option to rename a file, without the ectension.
Is it also possible to select the file without the extension??
TIA
Andre Linoge
-
- Junior Member
- Posts: 84
- Joined: 2004-03-14, 22:22 UTC
That can be done with the TC Multi Rename function.Andre Linoge wrote:I create html-files for images and i need to replace "name" with the filename therefor i need to remove the extension.Horst.Epp wrote:No, there is no such option.
What is the reason for this question ?
Rather tidious job.
<title>Name</title>
<img src="Name.jpg" alt="">
How is your work flow?Andre Linoge wrote: I create html-files for images and i need to replace "name" with the filename therefor i need to remove the extension.
Rather tidious job.
<title>Name</title>
<img src="Name.jpg" alt="">
Do you always work on one single file,
or do you have to get the base name of many files at once?
Test this out, I think that should work:
For one file you can use this button:
Code: Select all
TOTALCMD#BAR#DATA
cmd /c
echo %O | clip
%Commander_Path%\WCMICONS.DLL,7
1
-1
For a few files (up to 50) you can use this button:
Code: Select all
TOTALCMD#BAR#DATA
cmd /c
del %tmp%\tmp && for /F "tokens=*" %%F in ('type %F') do (@echo %%~nF >> %tmp%\tmp) && type %tmp%\tmp | clip
%Commander_Path%\WCMICONS.DLL,7
1
-1
You can also use this commands in usercmd.ini to be able to add keyboard shortcuts.
@Christian .G.:
I think this thread is another request for some more base-name-only commands and parameters, like:
%o = write list with base names of all selected items (like %O)
and
cm_CopyBaseNamesToClip (like cm_CopyNamesToClip)
There was a nice trick from user white:
- Select your files.
- Open the Multi Rename Tool.
- Rename Mask:
- Leave Extension empty.
- Search for:
- Replace with:
- [x] RegEx
- <F10> "Edit names..."
- Copy the result from the editor into your HTML-file.
HTH
Holger
- Select your files.
- Open the Multi Rename Tool.
- Rename Mask:
Code: Select all
#[N]#[N].[E]
- Search for:
Code: Select all
#(.*)#(.*)
Code: Select all
<title>$1</title> <img src="$2" alt="">
- <F10> "Edit names..."
- Copy the result from the editor into your HTML-file.
HTH
Holger