Using sequential numbers in filenames to manipulate Created date and time

I have a folder of images that all start with a prefix of 0001 and so on. I want to be able to change their Created&Modified date and time so that when I sort by date in explorer they are in the same order as If sorted by name. Now they all have random dates and time.

I've read User Guide and old Forum topics but could not find a solution :(
Reply to #1:
Welcome, Nik!

Create a new "Script" method.

Paste this code into it and hit "Apply script":
//----------------------------------
newD = new Date();
newD.setHours (newD.getHours() - 2); // Start 1 to 2 hours back to reduce chance of "Future" files.
newD.setSeconds (newD.getSeconds() + index); // Increment seconds by one to avoid time collisions.

item.newModifiedDate = newD;
item.newCreatedDate = newD;
//----------------------------------

Be sure to sort the files, that you add to Aren, by Filename before running the batch. (Click the "Filename" column header to toggle between sort, sort ascending, and sort descending.)

You can also right-click on the column headers to show the "New Modified Date" if you wish to preview the changes.

~~~~~~~~
ETA: Also note that explorer is extremely messed up about dates. It usually shows and sorts by the "Modified" date. But if the file has Metadata it will *sometimes* use that instead! It does worse, but fortunately rarely.
Reply to #2:
Thank you very much for your help Randy! This is exactly what I wanted to accomplish.
Reply to #3:
You're welcome; glad to help!