Detecting/grouping a series of files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Given a directory full of digital photos with file names like

new york skyline 1.jpg
new york skyline 2.jpg
new york skyline 3.jpg
new york skyline 4.jpg
new york skyline 5.jpg
statue-of-liberty-1.jpg
statue-of-liberty-2.jpg
statue-of-liberty-3.jpg
statue-of-liberty-3.jpg
statue-of-liberty-4.jpg
broadway 2.8.06 1.jpg
broadway 2.8.06 2.jpg
broadway 2.8.06 3.jpg
broadway 2.8.06 4.jpg
broadway 2-9-06 1.jpg
broadway 2-9-06 2.jpg
broadway 2-9-06 3.jpg
broadway 2-9-06 4.jpg
broadway 2 10 06 1.jpg
broadway 2 10 06 2.jpg
broadway 2 10 06 3.jpg
broadway 2 10 06 4.jpg
bridge_1.jpg
bridge_2.jpg
bridge_3.jpg
....etc.

....what method would you recommend to detect the individual series of photos
(new york skyline, bridge, etc.) and group them for processsing? (maybe
creating subfolders or zip archives for each set). As you can see, there
isn't a consistent naming convention, but the field delimiters will most
likely be spaces, hyphens or underscores.

Thanks,
Neil
 
Hello, Neil!

You can introduce differences number. And then group images by this number.
That is lets take that differences number is 2 ( this means that if 2 filenames have only 2 differences they apparently can be grouped )

broadway 2 10 06 1.jpg
broadway 2 10 06 2.jpg
Have 2 differences - can be grouped

statue-of-liberty-4.jpg
broadway 2.8.06 1.jpg
Have a lot of differences - cannot be grouped

Also IMO the algorithm will benefit if the number of allowed differences will depend on number of delimeted words.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top