[Solved] Rename folders only

Any questions? Need some help?
Post Reply
tooviral
Posts: 3
Joined: 01 Feb 2016, 17:16

[Solved] Rename folders only

Post by tooviral »

Hello have used the rename all script viewtopic.php?f=4&t=5#p2211 and it works great.

Only issue i have is I would like to rename folders with "The", "A" and "An" at the end of the folder.

Just can't wrap my head around adding this http://www.filebot.net/forums/viewtopic.php?f=5&t=211 so it works.

Any help appreciated.
Last edited by tooviral on 03 Feb 2016, 13:50, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 24047
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename folders only

Post by rednoah »

1.
Learn how to use formats:
http://www.filebot.net/naming.html

Then look at the example:
Example wrote:The Avengers => Avengers, The

Code: Select all

{n.sortName('$2, $1')}

2.
If you're using the command-line for the first time then you want to read this as well:
viewtopic.php?f=4&t=1899
:idea: Please read the FAQ and How to Request Help.
tooviral
Posts: 3
Joined: 01 Feb 2016, 17:16

Re: Rename folders only

Post by tooviral »

ok, so where would I add

Code: Select all

{n.sortName('$2, $1')}
to

Code: Select all

filebot -script fn:renall "path/to/movies" -non-strict --db TheMovieDB --def target=folder
??
User avatar
rednoah
The Source
Posts: 24047
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename folders only

Post by rednoah »

The --format option is well-documented. Which part did you not understand, how can we make the documentation better?
:idea: Please read the FAQ and How to Request Help.
tooviral
Posts: 3
Joined: 01 Feb 2016, 17:16

Re: Rename folders only

Post by tooviral »

Alright I understand that you prob get annoyed by people asking to get spoonfed the answers. But I've looked around the forum and website and I do find some answers, just not how to use them. No list of commandline arguments, just some examples of how to use the command line.

I've tried

Code: Select all

filebot -script fn:renall "path/to/movies" -non-strict --db TheMovieDB --def target=folder -- format "{n.sortName('$2, $1')} ({y})"
And that seems to get what I want done.

Thanks
User avatar
rednoah
The Source
Posts: 24047
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Solved] Rename folders only

Post by rednoah »

1.
Yep, you got it~ :ugeek:

Just pass in your own format, if you don't like the default:

Code: Select all

--format "{n.sortName('$2, $1')} ({y})"
If you're on Linux you need to be careful with $variables though. On Windows $ has no special meaning.


2.
Which part did you not understand, how can we make the documentation better?
This is actually a somewhat serious question! If you have any ideas for improvement, I'm all ears. :D
:idea: Please read the FAQ and How to Request Help.
Post Reply