Perl Script to fix beginning of File name
#!/usr/bin/perl -w print("Filename beginning characters that you want to change: "); chomp($badex = <STDIN>); print("Filename beginning that you want added: "); chomp($goodex = <STDIN>); foreach $file (<$badex*>){ @fields = split(/$badex/,$file); $goodfile = ("$goodex" . "$fields[1]"); rename("$file","$goodfile"); }
No comments:
Post a Comment