I
I
i3core2021-09-14 15:02:33
Regular Expressions
i3core, 2021-09-14 15:02:33

Move file creation date to end of name?

There are files with names in the following format:
2013-05-26_vasya_1.flv
2010-05-20_01-31-38_vasya_1.flv
2019-05-21_vasya.flv
2011-05-27_01-22-07_vasya.flv
2013-05-29_vasya0000. flv
2015-05-29_01-31-38_vasya0000.flv
2013-05-29_333vasya.flv
2015-05-29_01-31-27_333vasya.flv
In a program that renames files in bulk (Advanced Renamer), there is an option to use regular expressions, you need to exit get it like this:
vasya_1_2013-05-26.flv
vasya_1_2010-05-20_01-31-38.flv
vasya_2019-05-21.flv
vasya_2011-05-27_01-22-07.flv
vasya0000_2013-05-29.flv
vasya0000-5-2015 29_01-31-38.flv
333vasya_2013-05-29.flv
333vasya_2015-05-29_01-31-38.flv
In general, as you can see, the dates need to be thrown to the end of the name.
"vasya" - random Latin name, dates - random, numbers "333" which at the beginning of "vasya" can also be random. The whole problem is that there are two formats, "2013-05-26_" and "2015-05-29_01-31-38_", in principle, two codes are possible, that is, these types of names can be renamed separately.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2021-09-14
@shambler81

So ?
https://regex101.com/r/vY3RDo/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question