summaryrefslogtreecommitdiff
path: root/Tools/schnitt/schnitt6.pl
blob: 92d9eb49cfa476d1ccfe8340fef7e013fe84b8a3 (plain)
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
#!/usr/bin/perl

open (FI,"a");

while (<FI>)
{
  open (SCH,"/usr/local/bin/my/schnitt5.pl $_|");
  $files = <SCH>;
  chomp $files;
  ($a,$b) = split (/\s/,$files);
  $files[$a] = 1;
  $files[$b] = 1;
  close (SCH);
}

while (<0*.vdr>)
{
  $_ =~ /\d(\d\d)\.vdr/;
  if ($files[$1])
  {
    print "Keeping $1\n";
  }
  else
  {
    print "Deleting $_\n";
    unlink $_;
  }
}

close (FI);