in reply to Re^2: Yet another perl-rename tool
in thread Yet another perl-rename tool

Yes, checking wether the target file exists will prevent lost files. I still think building and checking a replacement list is better, because it allows you to skip the whole batch of operations instead of having to dig through the output to fix rejected rename operations.

Replies are listed 'Best First'.
Re^4: Yet another perl-rename tool
by parv (Parson) on Feb 26, 2009 at 02:53 UTC
    Personally I prefer to have the processing be done on a list while skipping exceptions, unless requested otherwise. That way I could take care of remaining *few* offending ones on case by case basis. Ideally, operation would be done quietly (unless asked to be verbose) and errors would go to standard error, which can be redirected to a file to avoid "dig[ging] through the output to fix rejected rename operations".