http://qs321.pair.com?node_id=98702


in reply to Renaming Directories Recursively

recursive loop...

<psuedo-code>
sub rename_dir { $curdir = shift; opendir($curdir) foreach $dir(readdir($curdir)) { next unless $dir is directory; &rename_dir($dir); # recurse rename($dir); } closedir(current dir) }
</psuedo-code>
something to that effect should work, i can't create a test run here, but i think the basics should be in that example..
basically this follows the dir tree to the end, and then rename directories as it comes out of the loop.
-Syn0