#!/usr/bin/perl # # Fix the names of files in the current directory. $dir = `pwd`; chop $dir; $dir =~ s:(.*)/::; $dir =~ s:-:/:; $dir =~ s:-:/:; $dir =~ m:(.*)/(.*):; ($dir, $f) = ($1, $2); $dir =~ s:^:../../:; opendir(DIR, $dir) || die "$dir: $!"; while ($_ = readdir(DIR)) { next unless /^$f/; # next if $_ eq "Files.txt"; print "cp $dir/$_ dec-08-$_\n"; }