Find missing files

  • flac is rather sensitive when it comes to include images files into the encoded file. Other than mp3, if a image file format is not correct it would not include it in the resulting encoded file.
  • You can avoid this using my Exact Audio Helper for Exact Audio Copy v1.5 and Audacity Audio Helper to create your library, as the scripts contain a working step where image files are converted to compatible format with the help of ImageMagick.
  • To find those files in an older library, or one where ImageMagick was not used for image file conversion, here are the commands to be issued on a linux host to find the directories with missing flac files
    find <parent dir> -type f -iname '*.flac' -printf '%h\n'|sort|uniq > flac.txt   # this command finds all directories which contain flac files (replace "uniq" with "uniq -c" to have each line preceded with the count of files found)
    find <parent dir> -type f -iname '*.jpg' -printf '%h\n'|sort|uniq > jpg.txt     # this command finds all directories which contain jpg files (replace "uniq" with "uniq -c" to have each line preceded with the count of files found)
    grep -f flac.txt jpg.txt # find common lines in both files
    diff flac.txt jpg.txt # find line differences in both files