in reply to renaming subdirectories on MS Windows

I've written dozens of these scripts, and am very leery of doing actual renaming in program. I much prefer to generate a shell script to do my renaming, so that I can review it before any actual renaming is done
mv "one" "two"
This also avoids the problem you're experiencing on win32, trying to rename a directory while its in use

Replies are listed 'Best First'.
Re^2: renaming subdirectories on MS Windows
by aquarium (Curate) on Nov 03, 2010 at 22:01 UTC
    that's exactly what i would do. write a perl or whatever script to figure out which directories to rename, and the script generates a shell/batch file of the rename commands. you can review this batch rename commands before actual execution. the directory paths will need to be appropriately quoted to avoid problems.
    the hardest line to type correctly is: stty erase ^H