utnalove @ Mon Jul 06, 2009 9:43 am wrote:
My specialization is Networking, but I think I can make it run.
You can if you install Cygwin or maybe perl. Not otherwise.
First of all, it relies on the files being named consistently. The standard in mp3+g files, at least the most common one, is
DD1234-01 - Artist, The - Title, The.zip
It's as simple as:
cd /karaoke
find . -name '*.zip' | perl -pe 's:.*/::; s/\.zip$//; s/ - /\t/;'
An all-perl version would be:
Code:
#!/usr/bin/perl
use File::Find;
my $wanted = sub {
return unless -f $_;
s/\.(zip|kar|mid)$//i or return;
s/ - /\t/g;
print "$_\n";
};
my $dir = shift || '.';
File::Find::find($wanted, $dir);
You can install Strawberry Perl pretty easily (it's free, search Google).