Page 1 of 1

Increment Time

PostPosted: Mon Oct 12, 2020 11:04 pm
by tinutapori
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!

Re: Increment Time

PostPosted: Tue Oct 13, 2020 6:19 pm
by therube
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...

Re: Increment Time

PostPosted: Sun Nov 22, 2020 10:35 pm
by brookster
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?

Re: Increment Time

PostPosted: Mon Nov 23, 2020 3:22 pm
by Luuk
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