Getting renaming script to work in Ubuntu?

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
joelwfl
Posts: 4
Joined: 01 Oct 2013, 06:08

Getting renaming script to work in Ubuntu?

Post by joelwfl »

Hi. Im having a hard tinme getting this script to work: http://filebot.net/scripts/sorty.groovy


Im unsure hos I get it to work. I see this part in the .groovy file: // PERSONALIZED SETTINGS def episodeDir = '''V:/in/TV''' def episodeFormat = '''V:/out/TV/{n}{'/Season '+s}/{episode}''' def movieDir = '''V:/in/Movies''' def movieFormat = '''V:/out/Movies/{movie}/{movie}'''.


Should i edit that part to get it to work, like replacing the episodeDir with my own dir, and IF so, should i keep the V: (not quite Sture how i ahould change it), or should I let it be and use the CLI to specify folder?


I have my Media in /media/W/TV, running Ubuntu and want to use thw cli. Would very much appreciate aome hel o. this matter of renaming my files and storting thwm in folders.
joelwfl
Posts: 4
Joined: 01 Oct 2013, 06:08

Re: Getting renaming script to work in Ubuntu?

Post by joelwfl »

...Otherwise, IF someone could post an alternative way for me to reste proper season and series folders and then rename all episodes.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Getting renaming script to work in Ubuntu?

Post by rednoah »

Sorty is just an example. Learn from it and write your own solution.

I guess this simple call will already get you very far:

Code: Select all

filebot -script fn:renall /media/W/TV --db thetvdb -non-strict
The sort into folders part comes with adding --format:
http://www.filebot.net/naming.html

And you can run with --action test first to try it out.
:idea: Please read the FAQ and How to Request Help.
joelwfl
Posts: 4
Joined: 01 Oct 2013, 06:08

Re: Getting renaming script to work in Ubuntu?

Post by joelwfl »

Thank you so much for the help!

Found this format expression: X:/TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}

How do I add it to my command (filebot -script fn:renall /media/W/TV --db thetvdb -non-strict)? Can I create a file of some sorts to contain both the command and the expression?
joelwfl
Posts: 4
Joined: 01 Oct 2013, 06:08

Re: Getting renaming script to work in Ubuntu?

Post by joelwfl »

How can i add the format? Can it be added to the command line command like filebot -script fn:renall /media/W/TV --db thetvdb -non-strict --format X:/TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Getting renaming script to work in Ubuntu?

Post by rednoah »

Yes. But you need to learn how to pass cmdline arguments first, i.e. to correctly quote and escape the format expression.

Once you have your command u can copy it into a shell script. That's as basic as it gets. Find more info on google.
:idea: Please read the FAQ and How to Request Help.
Post Reply