#1 : 08/05-22 10:17 firemouz
Posts: 3
|
Hello,
i want to rename tons of files in different folders at once. The filenames are often the same "01", "02", "043", "044" and so on. But i also have files with "good" names "holiday-2021-05-27". Now i want to rename all files which have only 3 letters with "<DirName:1>-<Name>-" (=Foldername - filename) But all files which are longer than 3 letters i do NOT want to rename. Only the short filenames with max. 3 letters. (How) can i do this with advance renamer? |
#2 : 08/05-22 13:35 David Lee
Posts: 1125
|
Replace: ^(.{3})$
with: <DirName:1>-\1 Use regular expressions "^" : Beginning of filename "(.{3})" : Capture exactly 3 characters "$" : End of filename |
#4 : 09/05-22 20:00 firemouz
Posts: 3
|
Reply to #2:
Thank you for your answer. It works great, but it does only replace the files with exactly 3 characters. I want to replace all files with up to 3 characters. So files with only 1, 2 or 3 characters. Maybe with my bad english i explained it a litte wrong/bad. Can you change it to "all files up to 3 characters" and not only the files with exactly 3 characters? |
#5 : 09/05-22 22:40 David Lee
Posts: 1125
|
Reply to #4:
Sorry - I should have read your question more carefully! Text to be replaced: ^(.{1,3})$ |
#6 : 10/05-22 17:31 firemouz
Posts: 3
|
Reply to #5:
Great, thank you very much! |