Here is a decent solution:
#!/usr/bin/perl -w foreach (@ARGV){ $name = $_ ; $name =~ s/T/B/; rename($_, $name); print "$_ renamed to $name\n"; }
Usage: changename.pl T*
I hope this helps.
J. J. Horner Linux, Perl, Apache, Stronghold, Unix jhorner@knoxlug.org http://www.knoxlug.org/
In reply to RE: Odd file rename
by jjhorner
in thread Odd file rename
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |