Itunes and Terminal Gurus; search file format question

Discussion in 'macOS' started by coreybox, Aug 18, 2009.

  1. coreybox macrumors member

    Joined:
    Oct 28, 2005
    #1
    Hello,

    Through some scripting mishap, I accidentally ended up with two copies of everything in my iTunes library. One was in lossless format, the other in AAC.

    I just went through and deleted all the AACs by hand. I'm worried that I might have accidentally deleted a lossless copy though, in stead of the AAC copy.

    Is there a way I can search through the trash (via terminal presumably) to make sure there are no lossless files in there? It'd be so easy if they didn't have the same extension....

    thanks,
    Corey
     
  2. RemarkabLee macrumors 6502a

    Joined:
    Nov 14, 2007
    #2
    Code:
    file <filename>
    Should tell you the contents of the file, whether it is lossless or AAC.

    Write a script around that command :)
     
  3. coreybox thread starter macrumors member

    Joined:
    Oct 28, 2005
    #3
    Thanks for the response.

    Sadly, I tried that last night but couldn't get it to work. The file command seemingly returns the same information for both lossless and aac files.
     
  4. coreybox thread starter macrumors member

    Joined:
    Oct 28, 2005
    #4
    Here is a picture illustrating what I said above:

    [​IMG]

    The top file is a known AAC file, the bottom is an apple lossless file. The output of the file command is identical.

    Anybody know a way to differentiate them using some terminal command?

    thanks,
    Corey
     
  5. rpp3po macrumors regular

    Joined:
    Aug 16, 2003
    Location:
    Germany
    #5
    Next time you try something like that, just add the file type column to iTunes and sort by it. The upper half will be AAC the lower ALAC. ;)

    For your present problem use 'afinfo --brief <filename>'.
     
  6. coreybox thread starter macrumors member

    Joined:
    Oct 28, 2005
    #6
    thank you! The simplest solution is the best!

    I wasn't aware that was even a display option in iTunes...
     

Share This Page