ronakg / smart-image-renamer

A script to intelligently bulk rename images using EXIF data
GNU General Public License v2.0
38 stars 13 forks source link

Should the sequence number really reset for different subfolders? #8

Open DrChr opened 7 years ago

DrChr commented 7 years ago

Hi, Is it intentional that the sequence counter resets for different subfolders?

I applied the script on a folder tree with two subfolders, as follows.

SD0
├── 102D3100
│   ├── DSC_0102.JPG
│   ├── DSC_0104.JPG
│   ├── DSC_1199.JPG
│   └── DSC_1968.JPG
└── 103D3100
    ├── DSC_0105.JPG
    └── DSC_0106.JPG

and the output of a test run is as follows

$ ~/repos/misc/smart-image-renamer/smart-image-renamer.py -s 2000 -r -t -f '{Seq}_{File}' SD0
Processing folder: <snip>/SD0

Processing folder: <snip>/SD0/102D3100
DSC_0102.JPG --> 2000_DSC_0102.JPEG
DSC_0104.JPG --> 2001_DSC_0104.JPEG
DSC_1199.JPG --> 2002_DSC_1199.JPEG
DSC_1968.JPG --> 2003_DSC_1968.JPEG

Processing folder: <snip>/SD0/103D3100
DSC_0105.JPG --> 2000_DSC_0105.JPEG
DSC_0106.JPG --> 2001_DSC_0106.JPEG

I'd prefer the sequence counter to keep incrementing, so that in this example the two last files would have been named "2004…" and "2005…" respectively.

ronakg commented 7 years ago

It is intentional. My assumption was that each folder would have images from different shoots, so sequencing should reset.

May be I should add a switch that changes this behavior.

DrChr commented 7 years ago

I would really appreciate that.

I'd be happy to test and review the changes, and although I currently don't really know Python well, I do know lots of other languages.

It is intentional

Ah, I see. Well in my case the Nikon D3100 is not very clever/helpful when it comes to naming photos/folders and now and then it creates additional folders, incrementing the initial three-digit number in the folder name, e.g. going from 100D3100 to 101D3100 etc.