Don't ask to ask, just ask | |
PerlMonks |
Re^2: Rename All Files In a Directoryby aukjan (Friar) |
on Jul 01, 2005 at 11:38 UTC ( [id://471665]=note: print w/replies, xml ) | Need Help?? |
This is still because you don't check if the file returned is a directory.... In this case it matches '..', so the result is that $1 and $3 are empty, and the image name is '.'. When you try to rename you try to rename /path/to/directory/. to /path/to/directory._. To fix this Incorporate a check to see if it is a file or an directory, like mentioned in an earlier post: Re: Rename All Files In a Directory
In Section
Seekers of Perl Wisdom
|
|