set date/time from file name.

Advanced Renamer forum
#1 : 30/04-22 21:34
Hooni
Hooni
Posts: 1
hello..

I have small problem to set date/time
I usually use file name as filen ame [22.05.01] 012039 => [year.month.day] hour min sec

I tried to use Timestamp pattern as [<Year>.<Month>.<Day>] <Hour><Min><Sec>
but Year form needs to be 2022.
so it doesn't work.
<Year:00> also doesn't work.

if I change file name as [2022.05.01] 012039, then it works.

how can I set date/time from [22.05.01] 012039 ??

please.. help me..
have a nice day.


30/04-22 21:34
#2 : 30/04-22 22:35
David Lee
David Lee
Posts: 935
Set the timestamp as normal - which will result in year = 22

Then add a second Timestamp method using "Delta date and time" to add 2000 to Year


30/04-22 22:35 - edited 01/05-22 13:22
#3 : 01/05-22 13:27
David Lee
David Lee
Posts: 935
Reply to #2:
Alternatively, first Rename the files to convert 2-digit file timestamp years to 4-digits...

Replace: ^\[(\d{2}\.)
with: [20\1
Use regular expressions

Run the batch and then, in a separate pass, run the Timestamp method.

Note that the Timestamp method will always work on the ORIGINAL filename so you will not be able to do this in a single batch.


01/05-22 13:27