jdtoronto#!/usr/bin/perl $dir = "./test"; opendir(DIR,$dir) || die "NO SUCH Directory: $dir\n$!"; foreach $zips (readdir DIR){ $new_name = $zips; $new_name =~ s/\.log/\.txt/ig; rename ("$dir/$zips","$dir/$new_name") unless ($zips eq $new_name) +; } close(DIR);
In reply to Re^2: File Extension Renaming
by jdtoronto
in thread File Extension Renaming
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |