Page 1 of 1

file rename

PostPosted: Mon Apr 26, 2021 3:57 pm
by redipo
I have several files that have the following structure : <il testimone dello sposo ,Pupi ,Avati ,1997 ,,.avi and I need to rename with 1997,Il testimone dello sposo ,Pupi ,Avati ,1997,,.avi
Pls how can I do that with Bulk Rename?
Thanks

Re: file rename

PostPosted: Mon Apr 26, 2021 4:49 pm
by therube
Not really clear on your example, but see if something like this works:

1:RegEx
Code: Select all
Match:  (.*)(\d\d\d\d)(.*)
Replace:  \2,\1\2\3

Code: Select all
il testimone dello sposo ,Pupi ,Avati ,1997 ,,.avi   
->   1997,il testimone dello sposo ,Pupi ,Avati ,1997 ,,.avi

Re: file rename

PostPosted: Mon Apr 26, 2021 5:42 pm
by redipo
Yes, fine it works. Thanks a lot.
Pls can you explain me about that "formula"?
Many thanks,

Renato

Re: file rename

PostPosted: Mon Apr 26, 2021 8:43 pm
by therube
(.*) match anything \1 (up to)
(\d\d\d\d) 4-digits \2 (then)
(.*) match everything else that follows \3

then copy that set of digits, \2, followed, by a comma, , , followed by all that was already there \1\2\3.

Re: file rename

PostPosted: Tue Apr 27, 2021 9:15 am
by redipo
Many thanks but I still do not understand.
Please would you mind to explaine me again but with more details?
Sorry to bother you again.
Thanks you very much.

Renato