momo33 has asked for the wisdom of the Perl Monks concerning the following question:
Thank you very much#!/usr/bin/perl use File::Find; use File::Copy; sub FindData { my $fulldir = $File::Find::dir; my $filename = $File::Find::name; ... open( IN, "<$filename" ) || die "cannot find $filename \n"; .... close IN; if ($olddir ne $newname) { move( "$basedir/$olddir", "$basedir/$newname" ); } } } finddepth( {wanted=>\&FindData,no_chdir}, @path );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: renaming subdirectories on MS Windows
by roboticus (Chancellor) on Nov 03, 2010 at 20:41 UTC | |
by momo33 (Beadle) on Nov 03, 2010 at 21:02 UTC | |
Re: renaming subdirectories on MS Windows
by toolic (Bishop) on Nov 03, 2010 at 20:45 UTC | |
Re: renaming subdirectories on MS Windows
by Jim (Curate) on Nov 04, 2010 at 00:00 UTC | |
Re: renaming subdirectories on MS Windows
by Anonymous Monk on Nov 03, 2010 at 21:07 UTC | |
by aquarium (Curate) on Nov 03, 2010 at 22:01 UTC | |
Re: renaming subdirectories on MS Windows
by locked_user sundialsvc4 (Abbot) on Nov 04, 2010 at 13:01 UTC | |
by Jim (Curate) on Nov 06, 2010 at 04:37 UTC |