happyuser wrote:but on a partition on my external drive I keep backups of iOS apps I’ve purchased. These have the same app name, but different version number, so yes, the filename reveals the difference.
Not necessarily; here's an obvious exception:
- Code: Select all
% ls -1 Angry*
Angry Birds 1.0.2.ipa
Angry Birds 1.1.3 1.ipa
Angry Birds 1.1.3.ipa
Angry Birds 1.2.0 1.ipa
Angry Birds 1.2.0.ipa
Angry Birds 1.3.0 1.ipa
Angry Birds 1.3.0 2.ipa
Angry Birds 1.3.0.ipa
Angry Birds 1.4.0 1.ipa
Angry Birds 1.4.0.ipa
Angry Birds 1.5.1 1.ipa
Angry Birds 1.5.1.ipa
Angry Birds 1.5.2.ipa
Angry Birds 1.6.2 1.ipa
Angry Birds 1.6.2.ipa
Angry Birds 3.1.2 1.ipa
Angry Birds 3.1.2.ipa
Angry Birds 3.3.0.ipa

That's a mix of unique iPhone/iPod and iPad versions of free editions I've accumulated. As you see, there's no way to identify and differentiate them just from filenames. Of course you might not currently have apps named like those but it's good to know they could exist in the future.
Thanks for the detailed explanation of what you'd like to do. Seems impossible without scripting, if you want to handle cases like above. I don't know much about the contents of ZIP-formatted IPA files but iTunesMetadata.plist files I just extracted from a couple appear to contain enough information for accurate name/version identification purposes, e.g.:
- Code: Select all
% egrep -A1 'bundleVersion|itemName' *.plist
iTunesMetadata copy.plist: <key>bundleVersion</key>
iTunesMetadata copy.plist- <string>1.1.3</string>
--
iTunesMetadata copy.plist: <key>itemName</key>
iTunesMetadata copy.plist- <string>Angry Birds Star Wars HD Free</string>
--
iTunesMetadata.plist: <key>bundleVersion</key>
iTunesMetadata.plist- <string>1.1.3</string>
--
iTunesMetadata.plist: <key>itemName</key>
iTunesMetadata.plist- <string>Angry Birds Star Wars Free</string>
Hopefully that much is helpful. I can't go any further with it now.