[DOCS] --conflict resolution for duplicate file paths
Posted: 06 Nov 2021, 02:47
The --conflict option allows you to specify what happens when a file cannot be processed because the destination path already exists.
Conflict Options:
--conflict SKIP ... skip files where the destination file paths already exists (default behaviour if --conflict is left unspecified)
--conflict OVERRIDE ... process files even if the destination file path already exists and replace the existing file (i.e. delete and overwrite)
--conflict AUTO ... process files even if the destination file path already exists and replace the existing file (i.e. delete and overwrite) but only if the new file is better (i.e. higher resolution, higher bitrate, larger file size, etc) than the old file
--conflict INDEX ... add .1 .2 .3 etc to the destination file path if necessary so that the given file can be processed
--conflict FAIL ... fail and stop processing files once a file cannot be processed
Conflict Options:
- SKIP (skip existing files)
- OVERRIDE (replace existing files)
- AUTO (replace the existing file if the new file is better)
- INDEX (add index and keep both files)
- FAIL (fail and quit)
--conflict SKIP ... skip files where the destination file paths already exists (default behaviour if --conflict is left unspecified)
Code: Select all
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict SKIP
Skipped [Avatar.2009.mp4] because [Avatar (2009).mp4] already exists
--conflict OVERRIDE ... process files even if the destination file path already exists and replace the existing file (i.e. delete and overwrite)
Code: Select all
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict OVERRIDE
[MOVE] from [Avatar.2009.mp4] to [Avatar (2009).mp4]
--conflict AUTO ... process files even if the destination file path already exists and replace the existing file (i.e. delete and overwrite) but only if the new file is better (i.e. higher resolution, higher bitrate, larger file size, etc) than the old file
Code: Select all
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict AUTO
[MOVE] from [Avatar.2009.mp4] to [Avatar (2009).mp4]
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict AUTO
Skipped [Avatar.2009.mp4] because [Avatar (2009).mp4] already exists
--conflict INDEX ... add .1 .2 .3 etc to the destination file path if necessary so that the given file can be processed
Code: Select all
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict INDEX
[MOVE] from [Avatar.2009.mp4] to [Avatar (2009).1.mp4]
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict INDEX
[MOVE] from [Avatar.2009.mp4] to [Avatar (2009).2.mp4]
--conflict FAIL ... fail and stop processing files once a file cannot be processed
Code: Select all
$ filebot -rename Avatar.2009.mp4 --db TheMovieDB --log INFO --conflict FAIL
Failed to process [Avatar.2009.mp4] because [Avatar (2009).mp4] already exists