Page 1 of 1

Running the AMC script on a folder?

Posted: 16 Aug 2014, 06:43
by iNemzis
Hi guys,

I feel like this is an absolutely stupid question, but I can't find the answer myself, so figured it wouldn't hurt to ask.

I'm running Mac OS X 10.9.4, and have the AMC script functioning correctly with Transmission. I can download a torrent, and it will complete, rename, and move to the location I want it to - perfect! I'm likely going to tweak the script once I learn a little more (I have no programming knowledge whatsoever). Anyway, I've been downloading movies/TV for a few weeks now without unarchiving, renaming, moving everything for a while, so I have a large backlog of stuff I would love Filebot to unarchive and move for me, without having to do that all manually.

Is there a very simple change I can make to the script I'm using (or more likely re-write a new one for one-time use), so that when I run it, it will perform the extractions etc on the whole folder? The problem is in my understanding of the script, so a nudge in the right direction would be perfect.

Currently functional torrent AMC script:

Code: Select all

#!/bin/bash
/Applications/Filebot.app/Contents/MacOS/filebot.sh -script fn:amc --output "/Users/iNemzis/Desktop" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y deleteAfterExtract=y clean=y "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
I would just like to run the above on my Downloads folder, and let it work its magic. :)

Also, while I'm here - the above script works great, however it leaves the torrent archive folder behind along with the usual .nfo files and whatnot. I thought the clean=y command would clear those?

Cheers for any assistance! I plan on donating, as I've been using Filebot (unautomated) for years :)

-iNemzis

Re: Running the AMC script on a folder?

Posted: 16 Aug 2014, 08:03
by rednoah
1.
It's just a cmdline tool, so call it from cmdline. There's a section called Run from cmdline in the manual.

2.
--action copy will obviously leave things behind for seeding.

Re: Running the AMC script on a folder?

Posted: 16 Aug 2014, 08:42
by iNemzis
Oh yes, thank you for point 2, I should have realised that.

As for the main issue, I'm trying the "filebot -extract /Users/iNemzis/Downloads/" command, but it just says "done" with no extracting. However if I go deeper, ie, "filebot -extract /Users/iNemzis/Downloads/The.Knick.S01E02.HDTV.x264-KILLERS" it successfully extracts the file. Is it just a case of Filebot not able to extract from two levels up?

Thanks for your reply, you have made amazing software :)

Re: Running the AMC script on a folder?

Posted: 16 Aug 2014, 09:29
by iNemzis
Hmm, I perhaps need to alter the renall script you have made, with a command for extraction?

Re: Running the AMC script on a folder?

Posted: 16 Aug 2014, 10:15
by iNemzis
Hi Rednoah, I couldn't figure it out with Filebot, but used "open */*.rar" with The Unarchiver in terminal, and that's doing the trick. Will only need the torrent script now, which is all up and running. Again, thanks for the software :)

Re: Running the AMC script on a folder?

Posted: 16 Aug 2014, 16:40
by rednoah
Extract all archives in the given folder:

Code: Select all

filebot -extract /folder
Extract all archives in the entire file tree:

Code: Select all

filebot -extract -r /folder