http://www.perlmonks.org?node_id=1024273


in reply to Re: Rename multiple files following their directories' name
in thread Rename multiple files following their directories' name

Or use File::Copy::move, which doesn't require mv, and thus should work on Windows too.