Hello,
sometimes I am replacing an existing movie with a version in better quality. At least I want to replace them. The extensions are sometimes different so FileBot won‘t show me an exclamation that the movie already exists. But it would be a smart function if there would be an indicator if the target directory already exists or FileBot will have to create it.
In my case, if the directory already exists, I can remove the old version of the movie.
Thank you!
Show if target directory already exists
Re: Show if target directory already exists
Sorry, checking for nearby logical duplicates at rename time is not planned. However, there are tools that allow you to manage logical duplicates after renaming:
viewtopic.php?t=5#p23171
viewtopic.php?t=5#p23171
Re: Show if target directory already exists
Yeah, but if FileBot would just show if the directory already exists this would be working as well. All movies are placed in its own directory (Plex style), so if the directory already exists there is also another version of the movie in it. So there is no need for duplicate checking, only checking the directory a movie is moved to.
Re: Show if target directory already exists
maybe you can use this?
or
Code: Select all
{folder.exists() ? 'STOP' : 'Go on'}
Code: Select all
{f.parentFile.exists() ? 'STOP' : 'Go on'}
Re: Show if target directory already exists
The duplicates script could also be an option, I believe it matches with extended attrs, not file names, so it would likely flag duplicates if both files were processed using FileBot even with different extensions/quality.
I only work in black and sometimes very, very dark grey. (Batman)
Re: Show if target directory already exists
f and folder refer to the original file so this won't work, but the idea is good.kim wrote: ↑23 May 2020, 19:28 maybe you can use this?orCode: Select all
{folder.exists() ? 'STOP' : 'Go on'}
Code: Select all
{f.parentFile.exists() ? 'STOP' : 'Go on'}
You can modify your format in such a way, so that it checks if some file or folder already exists, and then format extra information into the destination path accordingly.
e.g. this might a bit slow, because we check xattr for all files in the movie folder for each file, but it should work:
Code: Select all
{
def movieFolder = '/path/to/Movies' as File
def duplicateFolder = '/path/to/Duplicate Movies' as File
id in movieFolder.files.metadata?.id
? duplicateFolder
: movieFolder
}
/{plex.tail}