Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.
I have a large CD collection that I have ripped to .aac on my hard drive. I recently noticed that some albums are missing track 1, but have the rest of the tracks. I need a good way to locate albums that need to be re-encoded.
My ripper (WinAmp) formatted the filenames - - - . An example filename looks like this:
Rush - Presto - 01 - Show Don't Tell.m4a
"TrackNumber" is zero-padded so it will always be two digits. So I need a list of every directory that has .m4a files in it, but NONE of the filenames contain " - 01 - ". I have already piped "ls -aR1" to a text file.
I considered using diff against a file with "- 01 -" and one with "- 02 -" to meet my needs, but want to know Perl a little bit better.
2011-09-04 11:20:00
Adam,did the information provided by ha14 help to solve your issue? Please let us know!
2011-09-03 16:22:00
Using perl to list files in a directoryhttp://forums.devshed.com/perl-programming-6/using-perl-to-list-files-in-a-directory-344889.htmlhttp://uk.answers.yahoo.com/question/index?qid=20090618014231AAoVEfphttp://perl.about.com/od/filesystem/qt/perlglob.htmHow do I list the files in a directory?http://perlmeme.org/faqs/file_io/directory_listing.htmlPerl tutorialhttp://www.comp.leeds.ac.uk/Perl/start.html