Author Topic: Resetting the Copy Number in the filename when new date is encountered  (Read 232 times)

Panthro83

  • Newbie
  • *
  • Posts: 1
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


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14405
    • ExifTool Home Page
You want lower case "%c" then.  Try "%.3nc".  ("n" starts the counting from 1.)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).