[macOS] AMC to sort different type of files to different hard drives
-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
[macOS] AMC to sort different type of files to different hard drives
All,
I was wondering if it is possible to construct an AMC that sorts different type of files to different hard drives. I have recently separated TV show files from movie files as there was not enough space on the hard drive they were on. So now the TV show files are on a different hard drive than the movie files and the AMC I was using until now does not work any more. Any suggestions?
Wil Dieteren
I was wondering if it is possible to construct an AMC that sorts different type of files to different hard drives. I have recently separated TV show files from movie files as there was not enough space on the hard drive they were on. So now the TV show files are on a different hard drive than the movie files and the AMC I was using until now does not work any more. Any suggestions?
Wil Dieteren
-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: AMC to sort different type of files to different hard drives
@rednaoh,
Thanks for the links, however I am unable to figure out how to change my script. I think I already set different drives for the different types of files, this worked for sorting in different folders on the same drive. Below my script:
Not sure why it does not work, any glaroing errors?
Thanks for the links, however I am unable to figure out how to change my script. I think I already set different drives for the different types of files, this worked for sorting in different folders on the same drive. Below my script:
Shell: Select all
#!/bin/bash
# Input Parameters
ARG_PATH="$1"
ARG_NAME="$2"
ARG_LABEL="$3"
/usr/local/bin/filebot -script fn:amc --output "/Volumes/Movies” --log-file "/Volumes/Movies/amc.log" --action duplicate --conflict auto -non-strict --def seriesDB="TheMovieDB::TV" --def subtitles=nl,en storeReport=y unsorted=y excludeList="/Volumes/Movies/amc.txt" "seriesFormat=/Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}" "movieFormat=/Volumes/Movies/Movies/{n} {y}" "ut_dir=$ARG_PATH" "ut_kind=multi" "ut_title=$ARG_NAME"
Re: AMC to sort different type of files to different hard drives

Shell: Select all
--def "movieFormat=/Volumes/Movies/Movies/{n} {y}"

Shell: Select all
--def "seriesFormat=/Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}"


-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: [macOS] AMC to sort different type of files to different hard drives
I have tried some changes but I am unable to get the script to work. Because of the changes, I think, I do no longer get an amc.log file, so I am unable to see what is going wrong. For now I think I will change the script to just check for TV Shows.
I did not understand your third set of remarks, the Volumes... remarks.
I did not understand your third set of remarks, the Volumes... remarks.
Re: [macOS] AMC to sort different type of files to different hard drives
WilDieteren wrote: ↑24 Jan 2025, 12:10 I have tried some changes but I am unable to get the script to work.

WilDieteren wrote: ↑24 Jan 2025, 12:10 I did not understand your third set of remarks, the Volumes... remarks.


-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: [macOS] AMC to sort different type of files to different hard drives
I am using qBittorent, want the Movies to go to /Volumes/Movies and the TV Shows to go to /Volumes/TV Shows. I am on an iMac, but you already new that right.
The script worked fine when the seriesFormat path and the movieFormat paths were on the same disk as the—output path.
The script worked fine when the seriesFormat path and the movieFormat paths were on the same disk as the—output path.
Re: [macOS] AMC to sort different type of files to different hard drives

EDIT:
I notice that you have accidentally typed a ” character and not a " character, so the command-line argument sequence is going to be completely broken starting from there:
Shell: Select all
--output "/Volumes/Movies”

Code: Select all
bash: unexpected EOF while looking for matching `"'

e.g. GOOD
Shell: Select all
/usr/local/bin/filebot -script fn:amc --output "/Volumes/Movies" --log-file "/Volumes/Movies/amc.log" --action duplicate --conflict auto -non-strict --def seriesDB="TheMovieDB::TV" --def subtitles=nl,en storeReport=y unsorted=y excludeList="/Volumes/Movies/amc.txt" "seriesFormat=/Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}" "movieFormat=/Volumes/Movies/Movies/{n} {y}" "ut_dir=$ARG_PATH" "ut_kind=multi" "ut_title=$ARG_NAME"
Shell: Select all
/usr/local/bin/filebot -script fn:amc --output "/Volumes/Movies” --log-file "/Volumes/Movies/amc.log" --action duplicate --conflict auto -non-strict --def seriesDB="TheMovieDB::TV" --def subtitles=nl,en storeReport=y unsorted=y excludeList="/Volumes/Movies/amc.txt" "seriesFormat=/Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}" "movieFormat=/Volumes/Movies/Movies/{n} {y}" "ut_dir=$ARG_PATH" "ut_kind=multi" "ut_title=$ARG_NAME"
-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: [macOS] AMC to sort different type of files to different hard drives
Changed the script to your corrected version and the script runs now. However I get a number of error messages:
Console Output: Select all
Run script [fn:amc] at [Sat Jan 25 09:02:23 CET 2025]
Parameter: seriesDB = "TheMovieDB::TV"
Bad seriesDB value: "TheMovieDB::TV"
Parameter: subtitles = nl,en
Parameter: storeReport = y
Parameter: unsorted = y
Parameter: excludeList = /Volumes/Movies/amc.txt
Parameter: seriesFormat = /Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = /Volumes/Movies/Movies/{n} {y}
Parameter: ut_label =
Parameter: ut_title = Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]
Parameter: ut_kind = multi
Parameter: ut_dir = /Volumes/Movies/Torrents/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]
Invalid usage: input folder [/Volumes/Movies/Torrents/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]] must not start with output folder [/Volumes/Movies]
Use excludes: /Volumes/Movies/amc.txt (0)
Ignore extra: /Volumes/Movies/Torrents/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]/Sample
Input: /Volumes/Movies/Torrents/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]/elsbeth.s01e01.2160p.web.h265-successfulcrab.mkv
Group files by movie or series
Group: {Series=Elsbeth (2024)} => [elsbeth.s01e01.2160p.web.h265-successfulcrab.mkv]
Get [Dutch] subtitles for 1 file
OpenSubtitles does not support anonymous login
Get [English] subtitles for 1 file
OpenSubtitles does not support anonymous login
Invalid --db value: '"TheMovieDB::TV"': "TheMovieDB::TV" not in [TheMovieDB, OMDb, TheTVDB, AniDB, TheMovieDB::TV, TVmaze, AcoustID, ID3, exif, xattr, file, OpenSubtitles, Shooter, AnimeLists, FanartTV]
Processing 1 unsorted files
[DUPLICATE] from [/Volumes/Movies/Torrents/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]/elsbeth.s01e01.2160p.web.h265-successfulcrab.mkv] to [/Volumes/Movies/Unsorted/Elsbeth.S01E01.2160p.WEB.H265-SuccessfulCrab[TGx]/elsbeth.s01e01.2160p.web.h265-successfulcrab.mkv]
Processed 1 file
Saving HTML report to [/Volumes/Movies/y/[2025-01-25_09_02]_Elsbeth_S01E01_2160p_WEB_H265-SuccessfulCrab[TGx].html]
Done ヾ(@⌒ー⌒@)ノ
Run script [fn:amc] at [Sat Jan 25 09:12:30 CET 2025]
Parameter: seriesDB = "TheMovieDB::TV"
Bad seriesDB value: "TheMovieDB::TV"
Parameter: subtitles = nl,en
Parameter: storeReport = y
Parameter: unsorted = y
Parameter: excludeList = /Volumes/Movies/amc.txt
Parameter: seriesFormat = /Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = /Volumes/Movies/Movies/{n} {y}
Parameter: ut_label =
Parameter: ut_title = Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX
Parameter: ut_kind = multi
Parameter: ut_dir = /Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX
Invalid usage: input folder [/Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX] must not start with output folder [/Volumes/Movies]
Use excludes: /Volumes/Movies/amc.txt (2)
No files selected for processing
Done ¯\_(ツ)_/¯
Re: [macOS] AMC to sort different type of files to different hard drives

Console Output: Select all
Parameter: seriesDB = "TheMovieDB::TV"
Bad seriesDB value: "TheMovieDB::TV"
...
Invalid --db value: '"TheMovieDB::TV"': "TheMovieDB::TV" not in [TheMovieDB, OMDb, TheTVDB, AniDB, TheMovieDB::TV, TVmaze, AcoustID, ID3, exif, xattr, file, OpenSubtitles, Shooter, AnimeLists, FanartTV]
...

Shell: Select all
--def seriesDB='"TheMovieDB::TV"'
Shell: Select all
--def seriesDB="\"TheMovieDB::TV\""

Shell: Select all
--def seriesDB="TheMovieDB::TV"

Console Output: Select all
$ filebot -script fn:amc --def seriesDB="TheMovieDB::TV"
Run script [fn:amc] at [Sat Jan 25 09:27:56 UTC 2025]
Parameter: seriesDB = TheMovieDB::TV
...

-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: [macOS] AMC to sort different type of files to different hard drives
Let me start with thanking you for all your help, I have gotten, I think, to where I want to be. I have combined the default qBittorent script:
with parts of my original script to get to:
which does what I want it to do, put Movies in /Volumes/Movies/Movies and TV Shows in /Volumes/TV Shows/TV Shows. However, there is something in the amc.log that looks like en error:
Should I worry that?
Shell: Select all
filebot -script fn:amc --output "X:/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=amc.excludes unsorted=y music=y artwork=y "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
Shell: Select all
filebot -script fn:amc --output "/Volumes/Movies" --log-file "/Volumes/Movies/amc.log" --action duplicate --conflict auto -non-strict --def subtitles=nl,en unsorted=y "excludeList=/Volumes/Movies/amc.txt" "seriesFormat=/Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}" "movieFormat=/Volumes/Movies/Movies/{n} {y}" "ut_label=%L" "ut_title=%N" "ut_kind=multi" "ut_dir=%F"
Console Output: Select all
Run script [fn:amc] at [Sat Jan 25 13:25:39 CET 2025]
Parameter: subtitles = nl,en
Parameter: unsorted = y
Parameter: excludeList = /Volumes/Movies/amc.txt
Parameter: seriesFormat = /Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = /Volumes/Movies/Movies/{n} {y}
Parameter: ut_label =
Parameter: ut_title = Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX
Parameter: ut_kind = multi
Parameter: ut_dir = /Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX
[b]Invalid usage: input folder [/Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX] must not start with output folder [/Volumes/Movies]
[/b]Use excludes: /Volumes/Movies/amc.txt
Input: /Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX.mkv
Group files by movie or series
Group: {Movie=Deadpool & Wolverine (2024)} => [Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX.mkv]
Get [Dutch] subtitles for 1 file
OpenSubtitles does not support anonymous login
Get [English] subtitles for 1 file
OpenSubtitles does not support anonymous login
Rename movies using [TheMovieDB]
Auto-detect movie from context [/Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX.mkv]
[DUPLICATE] from [/Volumes/Movies/Torrents/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX/Deadpool and Wolverine 2024 2160p WEB-DL DDP5 1 Atmos DV HDR H 265-FLUX.mkv] to [/Volumes/Movies/Movies/Deadpool & Wolverine 2024.mkv]
Processed 1 file
Done ヾ(@⌒ー⌒@)ノ
Run script [fn:amc] at [Sat Jan 25 17:32:18 CET 2025]
Parameter: subtitles = nl,en
Parameter: unsorted = y
Parameter: excludeList = /Volumes/Movies/amc.txt
Parameter: seriesFormat = /Volumes/TV Shows/TV Shows/{n}/{n} - {sxe} - {t}
Parameter: movieFormat = /Volumes/Movies/Movies/{n} {y}
Parameter: ut_label =
Parameter: ut_title = Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]
Parameter: ut_kind = multi
Parameter: ut_dir = /Volumes/Movies/Torrents/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]
[b]Invalid usage: input folder [/Volumes/Movies/Torrents/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]] must not start with output folder [/Volumes/Movies]
[/b]Use excludes: /Volumes/Movies/amc.txt (0)
Input: /Volumes/Movies/Torrents/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb.mkv
Group files by movie or series
Group: {Series=Love & Death (2023)} => [Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb.mkv]
Get [Dutch] subtitles for 1 file
OpenSubtitles does not support anonymous login
Get [English] subtitles for 1 file
OpenSubtitles does not support anonymous login
Rename episodes using [TheMovieDB] with [Airdate Order]
Lookup via [Love & Death, Loot] [Love and Death]
Fetching episode data for [Love & Death]
* Love & Death [124800] | 7 episodes | 1x01-07
Fetching episode data for [Loot]
* Love & Death [124800] | 7 episodes | 1x01-07
* Loot [197449] | 20 episodes | 1x01-10 .. 2x01-10
[DUPLICATE] from [/Volumes/Movies/Torrents/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb.mkv] to [/Volumes/TV Shows/TV Shows/Love & Death/Love & Death - 1x01 - The Huntress.mkv]
Processed 1 file
Done ヾ(@⌒ー⌒@)ノ
Re: [macOS] AMC to sort different type of files to different hard drives

Code: Select all
Invalid usage: input folder [/Volumes/Movies/Torrents/Love and Death S01E01 The Huntress 1080p AMZN WEB-DL DDP5 1 H 264-NTb[TGx]] must not start with output folder [/Volumes/Movies]

e.g.
Properties: Select all
INPUT = /Volumes/Movies/Completed Downloads
OUTPUT = /Volumes/Movies/Organised Movies
-
- Posts: 30
- Joined: 24 Nov 2015, 11:29
Re: [macOS] AMC to sort different type of files to different hard drives
Thanks again, I was not aware that this could be an issue, but have fixed it. Everything works again because of all your help, greatly appreciated.