Multi rename: Convert only parts of name to uppercase
Moderators: Hacker, petermad, Stefan2, white
Multi rename: Convert only parts of name to uppercase
Convert only parts of the filnames to uppercase
Here's my question. What about when only parts of the filnames need to be converted to uppercase?
ie. I want everything between '' '' converted to uppercase
filename1 ''comment''
filname200 ''comment''
anotherfilname ''tag''
Looking forward thanks!
Here's my question. What about when only parts of the filnames need to be converted to uppercase?
ie. I want everything between '' '' converted to uppercase
filename1 ''comment''
filname200 ''comment''
anotherfilname ''tag''
Looking forward thanks!
There is no built-in function in the replace part that can allows you to modify such nor uppercase in replaced part....ScoopyDoo wrote:Here's my question. What about when only parts of the filnames need to be converted to uppercase?
ie. I want everything between '' '' converted to uppercase
filename1 ''comment''
filname200 ''comment''
anotherfilname ''tag''
Looking forward thanks!
If you need very dedicated stuff, can program some scripting and do not care of 64bit support. You can use "script content plugin" and use it in MRT with a user defined script.
If you do not care of doing it inside TC, you can use MRS http://code.google.com/p/multi-rename-script/
Using tc only without the use of any plugins, I see several possibilities. But it requires two rename operations. I don't think it can be done in one go.ScoopyDoo wrote:What about when only parts of the filnames need to be converted to uppercase?
ie. I want everything between '' '' converted to uppercase
filename1 ''comment''
filname200 ''comment''
anotherfilname ''tag''
It further depends on the naming scheme. How can the comments and tags be differentiated from the file name? Are they separated by the first space in the file name?
I use 2* ' to make double quotes.
And yes the space in front of the first '' is the same in all filenames to be changed.
The text between ''?'' is of variable length so I really need a way to search for everything between double quotes within the filnames (which I have, search for: ''(.*?)'' replace with: $1 ) but somehow change $1 to uppercase.
And yes the space in front of the first '' is the same in all filenames to be changed.
The text between ''?'' is of variable length so I really need a way to search for everything between double quotes within the filnames (which I have, search for: ''(.*?)'' replace with: $1 ) but somehow change $1 to uppercase.
My suggestion is:
Step 1: Move the text between quotes to a location where it can be changed to uppercase.
Step 2: Change the text to uppercase and move it back.
For example:
Add quoted text as extension at the end of the file name:
Change extension to uppercase and move back:
Step 1: Move the text between quotes to a location where it can be changed to uppercase.
Step 2: Change the text to uppercase and move it back.
For example:
Add quoted text as extension at the end of the file name:
Code: Select all
Search for : (''.*'').*$
Replace with : $&.$1
Checked options: [E] and RegEx
Code: Select all
Extension mask : [U][E]
Search for : ''.*''(.*)\.(''.*'')$
Replace with : $2$1
Checked options: [E] and RegEx
Probably can be done in one step, please try this setting:
Code: Select all
Rename mask: file name: [n][N]-----[U][N]
Extension : [n][E]
Search for : ^([^']+)'.*-----[^']+(.*)
Replace with : $1$2
RegEx : YES
2jvh
Good one!
This one leaves file names intact when there is no text between quotes and handles optional text after the quoted text:
Good one!
This one leaves file names intact when there is no text between quotes and handles optional text after the quoted text:
Code: Select all
Rename mask: file name: [N]\[U][N][n]
Search for : (.*?)''.*''(.*)\\.*?(''.*'').*|\\.*
Replace with : $1$3$2
RegEx : YES
[E] : NO
It is a regular expression, you may read about them in TC help or in Internet.
Expression "^([^']+)'.*-----[^']+(.*)" finds all until first "'" character and marks as $1 (first subexpression) and then it finds all starting with "'" after "-----" and marks as $2 (second subexpression) so you can use theese subexpressions in replace pattern.
E.g.:
Expression "^([^']+)'.*-----[^']+(.*)" finds all until first "'" character and marks as $1 (first subexpression) and then it finds all starting with "'" after "-----" and marks as $2 (second subexpression) so you can use theese subexpressions in replace pattern.
E.g.:
Original name: filname200 ''comment''
Name after renaming: filname200 ''comment''-----FILNAME200 ''COMMENT''
Regular expression finds: filname200 ''comment''-----FILNAME200 ''COMMENT''
Replacing gets: filname200 ''COMMENT''