ExifTool Forum

ExifTool => Newbies => Topic started by: Panthro83 on June 18, 2018, 11:46:18 AM

Title: Resetting the Copy Number in the filename when new date is encountered
Post by: Panthro83 on June 18, 2018, 11:46:18 AM
I've trawled the forum's but have yet to find an answer of similar query.

I have batches of scattered photos that I'm renaming and moving to a new folder structure

I'm renaming to YYYY-MM-DD_###.jpg and want the sequence number ### to reset to 001 for each new day in a given month
eg if the following were in a folder to be renamed.
img_1234.jpg > 2018-05-02_001.jpg
img_5678.jpg > 2018-05-04_001.jpg
img_5679.jpg > 2018-05-04_002.jpg
img_6000.jpg > 2018-05-06_001.jpg

Is there a way to play with the copy command _%1.3C to do such? Apologies if I've missed the obvious

Thanks

Title: Re: Resetting the Copy Number in the filename when new date is encountered
Post by: Phil Harvey on June 18, 2018, 11:47:57 AM
You want lower case "%c" then.  Try "%.3nc".  ("n" starts the counting from 1.)

- Phil