#!/usr/bin/perl my $dir = shift or die "need a directory name"; opendir my $fd, $dir or die $!; for ( readdir $fd ) { next unless /\.AU~$/; my $old = "$dir/$_"; next unless -f $old; ( my $new = $old ) =~ s/~$/W/; rename $old => $new unless -e $new; } closedir $fd; #thx fletch
In reply to Re: Monitoring file names for changes in extension
by borisz
in thread Monitoring file names for changes in extension
by SteveS832001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |