Re: Renaming files across multiple directories
am 24.10.2005 10:02:43 von Joe SmithDieSpammersDie wrote:
> C:\01012005
> C:\01022005
> C:\01032005
> C:\01042005
> . . .
>
> Now, each of those directories has a file in it called "output.txt." I want
> to get everyone of those "output.txt" and copy it to a single directory
Untested:
C:\> perl -e "for(@ARGV){($n=$_)=/s(\d+)(.)output.txt/newdir$2$1.txt/;
rename $_,$n or warn 'rename(',$n,')',$!}"
-Joe