Multi-rename tool: how to keep only few letters on name.
I have:
ALEKSANER PLACE ch1_20220701150134_T.jpg
ALEKSANER PLACE_ch1_20220701150124_T.jpg
ALEKSANER_PLACE_ch1_20220701150114_E.jpg
ALEKSANER PLACE ALEKSANDER PLACEC ch1_20230701150134_T.jpg
ALEKSANER_PLACE_ALEKSANER_PLACE_ch1_20220801150134_E.jpg
ALEKSANER PLACE ch1_20250701150134_T.jpg
want to change all the names to keep only this format:
ch1_20220701150134.jpg
only the chanel name "ch1" with "_" and date.jpg
Multi-rename tool: how to keep only few letters on name.
Moderators: Hacker, petermad, Stefan2, white
Re: Multi-rename tool: how to keep only few letters on name.
Hello and welcome 2useybrain
FROM:
ALEKSANER PLACE ch1_20220701150134_T.jpg
ALEKSANER PLACE_ch1_20220701150124_T.jpg
ALEKSANER_PLACE_ch1_20220701150114_E.jpg
ALEKSANER PLACE ALEKSANDER PLACEC ch1_20230701150134_T.jpg
ALEKSANER_PLACE_ALEKSANER_PLACE_ch1_20220801150134_E.jpg
ALEKSANER PLACE ch1_20250701150134_T.jpg
TO:
ch1_20220701150114_E.jpg
ch1_20220701150124_T.jpg
ch1_20220701150134_T.jpg
ch1_20220801150134_E.jpg
ch1_20230701150134_T.jpg
ch1_20250701150134_T.jpg
Do in MRT:
Search for: (ch1.+)
Replace with: $1
[x]RegEx
[x]Subst
#################
Update based on useybrain answer as I forgot the trailing letters (but I do not handle here the newly added "_main" condition)
FROM:
ALEKSANER PLACE ch1_20220701150134_T.jpg
ALEKSANER PLACE_ch1_20220701150124_T.jpg
TO:
ch1_20220701150114.jpg
ch1_20220701150124.jpg
Do in MRT:
Search for: (ch1.+)_.
Replace with: $1
[x]RegEx
[x]Subst
FROM:
ALEKSANER PLACE ch1_20220701150134_T.jpg
ALEKSANER PLACE_ch1_20220701150124_T.jpg
ALEKSANER_PLACE_ch1_20220701150114_E.jpg
ALEKSANER PLACE ALEKSANDER PLACEC ch1_20230701150134_T.jpg
ALEKSANER_PLACE_ALEKSANER_PLACE_ch1_20220801150134_E.jpg
ALEKSANER PLACE ch1_20250701150134_T.jpg
TO:
ch1_20220701150114_E.jpg
ch1_20220701150124_T.jpg
ch1_20220701150134_T.jpg
ch1_20220801150134_E.jpg
ch1_20230701150134_T.jpg
ch1_20250701150134_T.jpg
Do in MRT:
Search for: (ch1.+)
Replace with: $1
[x]RegEx
[x]Subst
#################
Update based on useybrain answer as I forgot the trailing letters (but I do not handle here the newly added "_main" condition)
FROM:
ALEKSANER PLACE ch1_20220701150134_T.jpg
ALEKSANER PLACE_ch1_20220701150124_T.jpg
TO:
ch1_20220701150114.jpg
ch1_20220701150124.jpg
Do in MRT:
Search for: (ch1.+)_.
Replace with: $1
[x]RegEx
[x]Subst
Re: Multi-rename tool: how to keep only few letters on name.
not working.
I have DIFERENT DATES! And I dont want "_T" and "_E" on end of the name.
And sometimes I have:
ALEKSANDER PLACE _main_20220304050607_T.jpg
and I want:
ch1_20220304050607.jpg
I want:
erase EVERTING AT START AND END WITHOUT "20220304050607" (12 numbers) + ADD "ch1_" BEFORE DATE.
I have DIFERENT DATES! And I dont want "_T" and "_E" on end of the name.
And sometimes I have:
ALEKSANDER PLACE _main_20220304050607_T.jpg
and I want:
ch1_20220304050607.jpg
I want:
erase EVERTING AT START AND END WITHOUT "20220304050607" (12 numbers) + ADD "ch1_" BEFORE DATE.
Re: Multi-rename tool: how to keep only few letters on name.
Try it youself here for best results: https://regex101.com/ with the hints of stefan2 and on that webpage
HTH
Joube
HTH
Joube
Re: Multi-rename tool: how to keep only few letters on name.
useybrain wrote: 2024-01-24, 12:22 UTC erase EVERTING AT START AND END WITHOUT "20220304050607" (12 numbers) + ADD "ch1_" BEFORE DATE.
Code: Select all
Search for: \d{12}
Replace with: ch1_$0
[ ] [E]
[x] RegEx
[x] Subst
Re: Multi-rename tool: how to keep only few letters on name.
EXACLY THIS.
You save me 8h of work
))
Very thks my friend! Very.
14 DIGIT of course. My mistake!
REGARDS PEOPLE
You save me 8h of work

Very thks my friend! Very.
14 DIGIT of course. My mistake!
REGARDS PEOPLE
(Change 12 to 14 if you meant to say 14)Code: Select all
Search for: \d{12} Replace with: ch1_$0 [ ] [E] [x] RegEx [x] Subst