Auto Rename and Move each file to each folder

Support for Windows users
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Auto Rename and Move each file to each folder

Post 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?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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. ;)
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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 ?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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.
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post by BigSteve84 »

OK so I just add the custom format into the amc script I'm already using?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post by rednoah »

Yes. You will find details on how to pass in custom formats in the amc manual.
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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.
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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.
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post by rednoah »

Glad to hear you figured it out. Do you mind sharing your solution and experience for the next guy?
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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'}
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post by BigSteve84 »

Ok cheers, do I put that in with the format I've done so far? If so where do I put it?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post by rednoah »

Replace

Code: Select all

TV Shows
with

Code: Select all

{genres =~ /Kids/ ? 'Kids Shows' : 'TV Shows'}
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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}
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post by rednoah »

Pretty much. You either have literal parts like "Videos" or {...} expressions that yield a value depending on your expression code.
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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}
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post 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'}
:idea: Please read the FAQ and How to Request Help.
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post by BigSteve84 »

Awesome thanks a lot, one last thing where do I add this the amc script?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Auto Rename and Move each file to each folder

Post 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"
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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'}"
BigSteve84
Posts: 25
Joined: 10 Dec 2017, 13:34

Re: Auto Rename and Move each file to each folder

Post 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}"
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Auto Rename and Move each file to each folder

Post by rednoah »

Looks good to me at first sight. What does the log say?
:idea: Please read the FAQ and How to Request Help.
Post Reply