75lb/renamer

Add --skip option (opposite of --force)

75lb opened this issue · 0 comments

75lb commented

Discussed in #64

Originally posted by princebhanwra April 5, 2023
Currently, when we rename, it halts the complete process if the destination filename exists for any case.

$renamer --find "/\(4\).jpg/g" --replace "(2).jpg" --dry-run *
Dry run

ERROR: Unable to rename 03978N026_Y_9K_D(4).jpg to 03978N026_Y_9K_D(2).jpg [file exists]

Run `renamer --help` for usage instructions.

Yes, we have --force parameter to override the destination file. However, there is no option to skip erroneous cases and still continue with the reset.

i.e. we should have something like below
$renamer --find "/\(4\).jpg/g" --replace "(2).jpg" --skip --dry-run *