Author Topic: Sort and Split an images folder into odd and even files  (Read 2562 times)

Offline DarkWindu

  • Newcomer
  • *
  • Posts: 1
    • View Profile
Sort and Split an images folder into odd and even files
« on: April 30, 2014, 05:05:17 AM »
Hi,

I hope this is the correct place to post this,

I was wondering if anyone knows if there is a way to filter or sort odd and even files (reading the filename or ID) from the same folder.

Thanks.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Sort and Split an images folder into odd and even files
« Reply #1 on: April 30, 2014, 06:36:43 AM »
I was wondering if anyone knows if there is a way to filter or sort odd and even files (reading the filename or ID) from the same folder.

No, I know of no way to separate even files from odd files.  Using {filenamebase:-1} in a custom sort would get you sorting on the last digit, but they would be sorted in groups of 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.  To go any further, mathematical operators would have to be used and our variables don't have any sort of scripting.

-Kirk

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: Sort and Split an images folder into odd and even files
« Reply #2 on: April 30, 2014, 10:14:44 AM »
Further Kirk's suggestion using {filenamebase:-1}. If you combine this with a code replacement that changes the even digits in e.g the string “even” and the odd digits to “odd”, you can then sort on this using a custom sort and easily pick the odd and even images.

Does this help?
Hayo Baan - Photography
Web: www.hayobaan.nl