That's all.# my 'music' directory contains over 5000 files # so the fastest way to be listed: D:\tree /f /a .\music > \music_list.txt # later the following script is 'move'd to # %systemroot%\system32 ### begin use strict; my $argv = join '.*', @ARGV; my $song = qr/\|(?!\+\S{3})(\s.*?)$argv/i; my $clean = qr/^\W+(.+?)\W+$/; my $file = 'd:\music_list.txt'; my $album = q::; open my $fh, $file or die "cannot open $file: $!$/"; while(<$fh>){ /(\\|\+)-{3}/ and $album = $_ and next; if (/$song/) { s/$clean/$1/ for $_, $album; $album ? print "album: $album$/","song: $_$/$/" : print "album: . $/","song: $_$/$/"; $main::counter++; } } print "$/total: $main::counter song(s) found$/" if $main::counter; __END__ ### end # finally D:\copy ffind.pl %systemroot%\system32 D:\ffind.pl compare album: Good music song: Sinead O'Connor - Nothing Compares 2 U.mp3 album: party song: Sinead O'Conner - Nothing Compares To You.mp3 total: 2 song(s) found
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Quick file search
by graff (Chancellor) on Jan 05, 2006 at 03:59 UTC | |
by zentara (Cardinal) on Jan 05, 2006 at 11:46 UTC | |
by graff (Chancellor) on Jan 06, 2006 at 04:48 UTC | |
by sh1tn (Priest) on Jan 05, 2006 at 05:36 UTC | |
by graff (Chancellor) on Jan 05, 2006 at 05:46 UTC | |
by jplindstrom (Monsignor) on Jan 05, 2006 at 12:26 UTC | |
by sh1tn (Priest) on Jan 06, 2006 at 13:11 UTC |