Page 1 of 2

Auto Rename and Move each file to each folder

Posted: 13 Dec 2017, 11:12
by BigSteve84
Hi I'm new to filebot so I'm still learning everything, but is it possible to auto move each individual show from utorrent to the said shows folders ? such as xyz.mp3 will be moved to a folder called xyz if so could it go further and go to a subfolder called season 2 that's inside folder xyz?

Re: Auto Rename and Move each file to each folder

Posted: 13 Dec 2017, 11:18
by rednoah
I think you're looking for the amc script:
viewtopic.php?f=4&t=215

You can start with that, and then report back if it's working the way you want. ;)

Re: Auto Rename and Move each file to each folder

Posted: 14 Dec 2017, 21:14
by BigSteve84
Thanks that worked a treat. I'm wondering, I have my shows in different folders such as Kids Shows, Our Shows and Documentaries , is it at all possible that if a folder of a show called xyz is already in say Kids Shows that the said show will go straight from utorrent into the correct folder ?

Re: Auto Rename and Move each file to each folder

Posted: 14 Dec 2017, 21:44
by rednoah
Yes, you can do that via custom formats. In this case, your custom format would yield different destination paths for different input files.

Re: Auto Rename and Move each file to each folder

Posted: 17 Dec 2017, 08:10
by BigSteve84
OK so I just add the custom format into the amc script I'm already using?

Re: Auto Rename and Move each file to each folder

Posted: 18 Dec 2017, 11:15
by rednoah
Yes. You will find details on how to pass in custom formats in the amc manual.

Re: Auto Rename and Move each file to each folder

Posted: 22 Dec 2017, 07:55
by BigSteve84
I've looked through it and as I'm just starting, there's a lot to take in..so since it is my first time, would you be able help by showing me the script and maybe a brief explanation on what's in the script and what does what? just I genuinely take more in that way.

Re: Auto Rename and Move each file to each folder

Posted: 22 Dec 2017, 09:55
by rednoah
:idea: Best to just read the docs and get started without any customization. Once it's working, you can see what it does, and you can think about how what it does is different from what you want, and then we can figure out how to make changes to make it do what you want specifically.


1.
The amc script does a lot of things and has a lot of options. The amc manual is the best and most detailed explanation you will find:
viewtopic.php?f=4&t=215


2.
If you have questions about custom formats, then I recommend reading the documentation and playing with the Format Editor in the GUI until you get a hang of it:
https://www.filebot.net/naming.html


3.
Once you understand custom formats, you can go back to the amc manual and read the Change how files will be organized and renamed section which shows how to pass custom formats into the amc script.

Re: Auto Rename and Move each file to each folder

Posted: 22 Dec 2017, 10:51
by BigSteve84
Ok thanks a lot, how would the script no what show goes where? for example a kids show I want in a folder called Kids Shows where as say walking dead or whatever I would want to go to a folder called Our Shows and so on.

Re: Auto Rename and Move each file to each folder

Posted: 22 Dec 2017, 12:23
by rednoah
It wouldn't. That's where custom formats come in, and because you make the rules of what goes where, those rules would be encoded in your format.

There's many way to do this. Change folder based on certification/rating, based on genre, based on a list you make, all of the above or subset thereof. This part is kinda for advanced users that know exactly what the want.

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 09:01
by BigSteve84
Ok so I've managed to write a format where the shows are renamed to my liking and are separated via genre, (I thought I'd start by learning how to write something out)but obviously I want it automated and to go to specific folders of my choosing.

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 10:43
by rednoah
Glad to hear you figured it out. Do you mind sharing your solution and experience for the next guy?

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 13:45
by BigSteve84
How do I make sure kids shows go into a kids shows folder as for example using my current format an episode of lion guard has gone into a Adventure folder and also how do I separate American Dad from kids animated shows?

The format I used is B:/Videos/TV Shows/{genre}/n/{'Season '+s}/{n} - {s00e00} - {t} and that separated my TV Shows by genre, shows name, season and renamed my episodes like this Vikings - S05E03 - Homeland

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 14:05
by rednoah
Yes, but the logic to identify "Kids Shows" is up to your format.

e.g. use "Kids Shows" folder for all shows where any of the genres contains the word "Kids" (may or may not work depending on what value genres can have, so modify it to your needs)

Code: Select all

{genres =~ /Kids/ ? 'Kids Shows' : 'TV Shows'}

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 16:20
by BigSteve84
Ok cheers, do I put that in with the format I've done so far? If so where do I put it?

Re: Auto Rename and Move each file to each folder

Posted: 28 Dec 2017, 18:55
by rednoah
Replace

Code: Select all

TV Shows
with

Code: Select all

{genres =~ /Kids/ ? 'Kids Shows' : 'TV Shows'}

Re: Auto Rename and Move each file to each folder

Posted: 29 Dec 2017, 06:53
by BigSteve84
Kool thanks a lot, so If I want to add more to that would it look like this

Code: Select all

B:/Videos/{genres =~ /Kids/ ? 'Kids Shows' /Horror/ ? 'Our Shows' ?: 'TV Shows'}/n/{'Season '+s}/{n} - {s00e00} - {t}

Re: Auto Rename and Move each file to each folder

Posted: 29 Dec 2017, 08:03
by rednoah
Pretty much. You either have literal parts like "Videos" or {...} expressions that yield a value depending on your expression code.

Re: Auto Rename and Move each file to each folder

Posted: 30 Dec 2017, 07:42
by BigSteve84
Thanks for all your help. I got the kids shows and our shows working but when I add 'Our Animated Shows' which is for American Dad & Family Guy, everything but kids shows gets sent to the animation folder?

Code: Select all

{genres =~ /Kids/ ? 'Kids Shows' : /Animation/? ''Our Animated Shows' : 'Our Shows}

Re: Auto Rename and Move each file to each folder

Posted: 30 Dec 2017, 13:23
by rednoah
The code you posted is syntactically incorrect and doesn't work, so it doesn't do anything. ;)

Here's what you're trying to do:

Code: Select all

{genres =~ /Kids/ ? 'Kids Shows' : genres =~ /Animation/ ? 'Our Animated Shows' : 'Our Shows'}

Re: Auto Rename and Move each file to each folder

Posted: 02 Jan 2018, 00:04
by BigSteve84
Awesome thanks a lot, one last thing where do I add this the amc script?

Re: Auto Rename and Move each file to each folder

Posted: 02 Jan 2018, 00:08
by kim
http://www.filebot.net/forums/viewtopic.php?f=4&t=215
--def movieFormat="M:/Movies/{ny}/{fn}" seriesFormat="S:/TV/{n}/{fn}" animeFormat="T:/Anime/{n}/{fn}" musicFormat="N:/Music/{n}/{fn}"
or e.g.
--def seriesFormat=@"YOURseriesFormat.groovy"

Re: Auto Rename and Move each file to each folder

Posted: 02 Jan 2018, 00:40
by BigSteve84
Would it be something like this?

Code: Select all

filebot -script fn:amc --output "B:\Videos\Torrents\2nd\TV Shows" --action copy --conflict skip -non-strict --log-file  --def seriesFormat="{genres =~ /Kids/ ? 'Kids Shows' : genres =~ /Animation/ ? 'Our Animated Shows' : 'Our Shows'}"

Re: Auto Rename and Move each file to each folder

Posted: 05 Jan 2018, 16:15
by BigSteve84
OK so I've tried so hard to get this right but for whatever reason, it's not worked out and now my brain is frazzled, could you please tell me what it is I've got wrong please? I've gone back and forth with it anyway this is what I've been putting in utorrent.

Code: Select all

filebot -script fn:amc --output "B:\Videos\Torrents\Completed" --action copy -non-strict "/path/to/input" --log-file amc.log --def excludeList=amc.txt --def movieFormat="M:/Movies/{ny}/{fn}" seriesFormat="B:/Videos/TV Shows/{genres =~ /Children/ ? 'Kids Shows' : genres =~ /Animation/ ? 'Our Animated Shows' : genres =~ /Documentary/? 'Documentaries': 'Our Shows'}/ {n}/{'Season' +s}/{n} - {s00e00}" animeFormat="T:/Anime/{n}/{fn}" musicFormat="N:/Music/{n}/{fn}"

Re: Auto Rename and Move each file to each folder

Posted: 05 Jan 2018, 16:29
by rednoah
Looks good to me at first sight. What does the log say?