Javascript - change timestamp

Advanced Renamer forum
#1 : 23/02-16 21:38
P
P
Posts: 1
Hi All,

Can you please check the below and if you have any idea to solve, please reply.

My files are named as follows:

2013.03.04 video1.avi
2014.11.03 video2.avi

I would like to change the created/modified date of the files by the scripting feature based on the date specified in the file name.

I can set a new date in 'item.newModifiedDate' but how can I apply the new date to the file?
What do I have to return at the end in the 'return' command?

Thanks,


23/02-16 21:38
#2 : 26/02-16 21:43
Kim Jensen
Kim Jensen
Administrator
Posts: 883
Reply to #1:
Instead of the script method have you tried to use the Timestamp method and configure it to use "Filename pattern"? That feature is made for this purpose.
https://www.advancedrenamer.com/user_guide/metho d_timestamp


26/02-16 21:43