in reply to renaming subdirectories on MS Windows

Windows’ directory-traversal routines have never played well with code that manipulates the files or directories in any way.   No matter what language you are using, cache the names first, then troll through the list you’ve built.   This is true no matter what language you’re using, and as far as I know, it has been this way since Windows 3.1 if not earlier.

Replies are listed 'Best First'.
Re^2: renaming subdirectories on MS Windows
by Jim (Curate) on Nov 06, 2010 at 04:37 UTC
    No matter what language you are using, cache the names first, then troll through the list you’ve built.

    But you can't do this with Perl. Perl can't read Unicode file names on Windows.

    In general, Perl can't be used to work with folders and files on a Windows files system, even just to read their names, at least not simply and reliably.