in reply to Re: Mass file renaming
in thread Mass file renaming

Hi,

The file is closed, but the routine is still within a:

foreach(@files); loop

I don't know if this implements a lock of the files in the dir? If so, is it escapable?

thanks for your contribution.

Replies are listed 'Best First'.
Re^3: Mass file renaming
by swampyankee (Parson) on Nov 07, 2005 at 15:46 UTC

    It may have if you got @files by something like:

    opendir($dh, "$working_directory" @files = grep { /\.csv$/i } readdir($dh)

    and didn't close the directory. I know rmdir doesn't work on Windows if the directory being deleted is open somewhere; Windows may prevent writing the directory if it's still "open" by opendir.

    On the other hand...if you got the names by some other means, I'll admit being stumped.

    emc