|< 1 2 3 >| | 30 Einträge, 3 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$ordner="Songs";
opendir(d,"$ordner") or do { print "$!"; exit; };
@files=grep {/\.mp3$/} readdir d or do { print "$!"; exit; };
closedir(d);
$found=0;
foreach $file (@files)
{
next if $file =~ m/unknown/i;
next if $file =~ m/untitled/i;
$orifile = $file; # backup
$file =~ s/(_\d+)?\.mp3$//ig; # doppeltes ende weg
$file =~ s/feat.*?-//ig; # "featuring..." entfernen
$file =~ s/presents.*?-//ig; # "presents..." entfernen
$file =~ s/and.*?-//ig; # "and..." entfernen
$file =~ s/\bthe\b//ig; # "the" entfernen
$file =~ s/(th|ht)/t/ig; # schreibfehler th/ht -> t
$file = lc($file); # kleinschreiben
$file =~ s/[^a-z]//ig; # alle sonderzeichen weg
$total{$file}++; # zum hash addieren
}
foreach (sort keys %total)
{
if($total{$_}>1)
{
print $total{$_}."\t: ".$_."\n";
$found+=$total{$_}-1;
}
}
print "Finished\n";
print "Found $found double files";
<>;
stat($file)[7]
$total{$file}++; # zum hash addieren
push @{$total{$file}}, $orifile; # Dateinamen zum Hash hinzufuegen
$file =~ s/(th|ht)/t/ig;
$file =~ s/[^a-z]//ig;
|< 1 2 3 >| | 30 Einträge, 3 Seiten |