Increment Time

Bulk Rename Utility How-To's

Increment Time

Postby tinutapori » Mon Oct 12, 2020 11:04 pm

Hi,

I am using this utility to bulk rename my files to: 1.jpg, 2.jpg, 3.jpg, 4.jpg, etc, it's always this scheme.

I would like to see if there is an ability to modify the Created/Modified time and increment time. For example, if I can give it a base date such as 10/1/2020 2:00pm, can it increment second or minutes for each file? E.g.
1.jpg: 10/1/2020 2:01pm
2.jpg: 10/1/2020 2:02pm
3.jpg: 10/1/2020 2:03pm
4.jpg: 10/1/2020 2:04pm

Thanks for your time!
tinutapori
 
Posts: 1
Joined: Mon Oct 12, 2020 10:58 pm

Re: Increment Time

Postby therube » Tue Oct 13, 2020 6:19 pm

CoreUtils (Binaries .zip) has the touch(.exe) command.
(touch, at least that touch, may not be able to do the created time? possible other touch's can?)

With that you may be able to automate something.
Set your wanted "base date" & "increment" as variables.
Then loop through your set o files, incrementing your increment as you go.

Pseudo-code:
Code: Select all
SET BASEDATE=20101001
> (10-01-2020)
SET BASE TIME=14
> (2:PM)
SET INCREMENT=01
> (1, MINUTE)


FOR I IN (*) DO CALL :doit
EXIT


doit:
TOUCH %I% -t %basedate%%time%%increment%
SET INCREMENT=INCREMENT+1


> (should give you something like what you'd want, I'd think)
> "pseudo", so not sure if syntax is correct...
> the times; basedate, time, & increment, need to be padded so increment (& the rest) have to be 01, 02, 03 (not simply 1, 2, 3)


-------


Alternatively, you might be able to use the Rename Pairs feature, setting up & pulling the data from an (Excel) spreadsheet...
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Increment Time

Postby brookster » Sun Nov 22, 2020 10:35 pm

Did you find a way to do this in BRU?

I have some jpegs from a slide scanner. They all have the same date and time (1970). The file names are PICTnnn.jpg format.

I can reset the date-time stamp to the current date in BRU, but I would also like to increment the create and modify times by one second for each photo so that they display in the same order in my web gallery, which can sort on time but not on file name.

I could write a Python script to do this, but it would be great if BRU can do it?
brookster
 
Posts: 1
Joined: Sun Nov 22, 2020 10:25 pm

Re: Increment Time

Postby Luuk » Mon Nov 23, 2020 3:22 pm

Greetings Brookster. Im thinking certainly the BRU does this also, but needs the javascript inside Special(14). Im not learned in the javascript yet, but if all your dates is already the same (1970), and all the names like PICTnnn.jpg, the exiftool.exe can also do this ...
Code: Select all
exiftool -ext jpg -overwrite_original -FileModifyDate"+<0:0:$FileSequence" -FileCreateDate"+<0:0:$FileSequence" "YourFolderName"
Its to increment the seconds, so to change the same date like ...
PICT001.jpg 1970:01:01/23:59:58 -> 1970:01:01/23:59:58
PICT002.jpg 1970:01:01/23:59:58 -> 1970:01:01/23:59:59
PICT003.jpg 1970:01:01/23:59:58 -> 1970:01:02/00:00:00
PICT004.jpg 1970:01:01/23:59:58 -> 1970:01:01/00:00:01
Luuk
 
Posts: 699
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To