#!/usr/bin/perl
$dirname = "/mtc12/home2/user/michael/Zcircuit/Socle/DATA/LVT_cells/Net_spc";
opendir(DIR, $dirname) or die "can't opendir $dirname: $!";
while (defined($file = readdir(DIR))) {
$dut = $dirname."/".$file;
$a_name = $file;
@ary=split(/\./, $a_name);
$new_file_name = $ary[0].".".$ary[1];
print $new_file_name."\n";
rename($dut, $new_file_name);
#copy($dut, $new_file_name);
}
closedir(DIR);
沒有留言:
張貼留言