AMC crashes with FileAlreadyExistsException moving movies

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
equinox83
Posts: 2
Joined: 15 Oct 2015, 00:15

AMC crashes with FileAlreadyExistsException moving movies

Post by equinox83 »

Hi all,

I'm having some trouble configuring the AMC function to move movie files. I'm using Windows. I want to move all movies into a single folder on my NAS, which I access via a symbolic link / junction (C:\movies -> \\nas\movies). I am not using a subfolder for each movie, and I wonder if this might be part of the problem?

Here is my script:

Code: Select all

filebot -script fn:amc --log-file C:/Users/equinox/Filebot/amc-movies.log --action move -non-strict --conflict auto "C:/Downloads/Movies-Complete" --def "movieFormat=C:/movies/{n} ({y})" --def clean=y --def excludeList=C:/Users/equinox/Filebot/amc-movies-exclude.txt --def plex=192.168.0.250 --def [email protected]:abcdefghijklmnop --def [email protected] --def storeReport=y
I can manually copy files to the NAS via the symbolic link, so it's not a permissions problem. The error message that I get (below) says the file already exists, but it doesn't. I have tried this with several movie files, none of which exist and it results in the same error.

Here is the final part of the log file, containing the error:

Code: Select all

Auto-detect movie from context: [C:\Downloads\Movies-Complete\The Land Before Time (1988) [1080p]\The.Land.Before.Time.1988.1080p.BluRay.x264.YIFY.mp4]
[MOVE] Rename [C:\Downloads\Movies-Complete\The Land Before Time (1988) [1080p]\The.Land.Before.Time.1988.1080p.BluRay.x264.YIFY.mp4] to [C:\movies\The Land Before Time (1988).mp4]
[MOVE] Failed to rename [C:\Downloads\Movies-Complete\The Land Before Time (1988) [1080p]\The.Land.Before.Time.1988.1080p.BluRay.x264.YIFY.mp4]
FileAlreadyExistsException: C:\movies
Clean clutter files and empty folders
Finished without processing any files
Failure (°_°)


I have tried using the --output parameter, and using the output path in --def movieFormat, and a combination, but it seems to make no difference...

I use a similar copy of the script to move TV, but that works successfully. Although, the TV does go to a separate folder per series:

Code: Select all

filebot -script fn:amc --output "C:/TV" --log-file C:/Users/equinox/Filebot/amc-tv.log --action move -non-strict --conflict auto "C:/Downloads/TV-Complete" --def "seriesFormat = {n}/{'Season '+s.pad(2)}/{sxe} - {t}" --def clean=y --def excludeList=C:/Users/equinox/Filebot/amc-tv-exclude.txt --def plex=192.168.0.250 --def [email protected]:abcdefgh --def [email protected] --def storeReport=y
If anyone has any advice that would be fantastic!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC crashes with FileAlreadyExistsException moving movie

Post by rednoah »

Use movie folders then. I'd recommend that anyway. :D

It'll probably work if you use network drives, or --output "\\nas" or something. Nobody on Windows uses symbolic links / junctions so most code isn't really aware of this.

I suspect that when filebot checks isFolder("C:\movies") Windows says NO, so FileBot tries to create that folder, so Windows says FileAlreadyExists. Not going to debug any of these Windows peculiarities unless there's real demand. ;)
:idea: Please read the FAQ and How to Request Help.
equinox83
Posts: 2
Joined: 15 Oct 2015, 00:15

Re: AMC crashes with FileAlreadyExistsException moving movie

Post by equinox83 »

rednoah wrote:I suspect that when filebot checks isFolder("C:\movies") Windows says NO, so FileBot tries to create that folder, so Windows says FileAlreadyExists.
That does seem like some pretty reasonable logic there... hmm, good point, I'll try doing it straight to the UNC path (//nas/...). The reason I went for the junctions was to try and eliminate any potential authentication problems connecting to the share after a reboot, but I can probably adjust the security on the NAS.


As for the movie folders... strongly recommended? Does it provide any advantages? I probably should do that, it seems to be the 'correct' way these days. I'm a bit scared to run Filebot against my whole movies folder, haha :D There's a lot of movies there!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: AMC crashes with FileAlreadyExistsException moving movie

Post by rednoah »

ALWAYS start with a small batch of movies, and --action test, and see how that works. ;)

If it was 1 files per movie it'd be fine, but you probably have some multi-part movies, CD1/CD2, etc. At some point you're probably wanna add movie.nfo and artwork files to help with Kodi/Plex/etc at which point you definitely need folders.
:idea: Please read the FAQ and How to Request Help.
Post Reply