opw62
April 30, 2014, 8:47am
1
Standard Rename panel
File Information Fields - enabled
Old name: .
New Name: bla bla {name}.{ext}
How to get the name without extension
File Information:
Filename={name} includes extension
Shortname={shortname}= same
Feels a bit like a newbie question...
=
MrC
April 30, 2014, 3:45pm
3
Or use Regular Expression mode:
Old name: (.+)(..*)
the basename is in \1 and the file extension including the dot is in \2.
opw62
May 1, 2014, 6:04am
4
Xyzzy:
[quote]The filename codes all support the following modifiers. These can be added to the control code sequence using a vertical bar (|) to separate the filename code from the modifier - for example, {file|noext} strips the file extension from the returned filename. Multiple modifiers can be provided using additional vertical bars to separate them - for example {file|noext|escwild} combines both noext and escwild together.[/quote]
Thanks !
Sorry for the delay. I did post yesterday, but apparently something went wrong.
I found this part in the helpfile indeed.
Tried it but one way or the other it doesn't work.
I tried {file|noext}, even copy-pasted the code from the helpfile, but it did not 'translate' into what I'd expected.
=
opw62
May 1, 2014, 6:21am
5
[quote="MrC"]Or use Regular Expression mode:
Old name: (.+)(..*)
the basename is in \1 and the file extension including the dot is in \2.[/quote]
As always...
Thanks a lot MrC !
At times one would like to save such renames as a preset, but then again,
often giving such preset a name in 2-3 words is a bit of a problem..
Anyway,thanks again.
Leo
May 1, 2014, 8:17am
6
Try {name|noext} instead of {file|noext}.
I could not get {name|noext} to work, the modifier seem to be ignored. The only way I could get it was via a rename script and using the item.name_stem. MrC's solutions is better.
opw62
May 1, 2014, 2:23pm
8
{file|noext}
{name|noext}
{shortname|noext}
Already tried those in the beginning of course, but no luck.
=
Leo
May 1, 2014, 2:36pm
9
Yeah, doesn't work here either. I thought it did but couldn't check at the time.
Variants of {file} definitely won't work as the Rename dialog only uses {name} {ext} and {extdir} for filename parts.
Wildcards or regexps are the normal way to get it, as you've all discovered. (Or item.name_stem in a script, as wowbagger mentioned.)