next if $sgf eq $new_file;
warn "$new_file already exists" and next if -e $new_file;
rename($sgf,$new_file);
+ my $psgz = $sgf;
+ $psgz =~ s/\.sgf/.ps.gz/;
+ if (-e $psgz) {
+ my $new_psgz = $new_file;
+ $new_psgz =~ s/\.sgf/.ps.gz/;
+ rename($psgz,$new_psgz);
+ }
}