Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^2: Remove (nearly) duplicate files recursively

by wrinkles (Pilgrim)
on May 19, 2008 at 10:22 UTC ( #687337=note: print w/replies, xml ) Need Help??

in reply to Re: Remove (nearly) duplicate files recursively
in thread Remove (nearly) duplicate files recursively

Thanks moritz, here's the updated code:
#!/usr/bin/perl -w use strict; use File::Find; find(\&process, '/Users/Shared/Music'); sub process { my $song = $File::Find::name; my $orig = $song; $orig =~ s/ 1\.mp3/.mp3/; if ( (m/[\d\D]*\s+1.mp3$/) && (-e $orig) ){ rename "$song", "/Users/wrinkles/dupes/$_" or die $!; print "$song removed. \n"; } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://687337]
Lady_Aleena just followed @metacpan on Twitter.
[atcroft]: I may just post a question about it later. *shrug*
[Lady_Aleena]: I wish I could have helped you further but I've never uploaded to cpan or metacpan so I don't know much.
[Lady_Aleena]: If metacpan had a pod checker too, I could check a pod I wrote with a module link there.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-05-27 04:37 GMT
Find Nodes?
    Voting Booth?