Search and move files

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Search and move files

Post by Alfke » 30 Jan 2017, 20:30

Hello again,

After my files are renamed, I wish to move them from the sorting directory to their target folders. Does filebot CLI have the ability to search by filename, and then move the files to the correct folder based on the filename? The target folders, subfolders and files are already named correctly using the same naming convention.

Example:

After renaming is completed:

NCIS - S14E6.mkv needs to be moved from sorting folder to /tv/ncis/season 14
Corner Gas - S06E04.mkv needs to be moved from sorting folder to /tv/corner gas/season 6
Bones - S01E03.mkv needs to be moved from sorting folder to /tv/bones/season 1

I can do this in bash, however I was wondering if filebot can do this.

Thanks

Alfke
Licensed User

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

Re: Search and move files

Post by rednoah » 30 Jan 2017, 20:54

Sure, but move/rename is a single operation as far as FileBot is concerned:

Code: Select all

filebot -rename -r /sorting -non-strict --db TheTVDB --output /tv --format {plex}
You might wanna add --mode interactive just in case. ;)

:idea: Please read FAQ #1 and learn how format expressions work.
:idea: Please read the FAQ and How to Request Help.

Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Re: Search and move files

Post by Alfke » 30 Jan 2017, 21:56

Thanks for the reply.

When I tried this, I have to specify the target folder. I'm trying to determine if filebot can move files on its own without me having to specify the target everytime?
Licensed User

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

Re: Search and move files

Post by rednoah » 31 Jan 2017, 06:57

You mean you don't want to type the command every time? Just make an alias then.
:idea: Please read the FAQ and How to Request Help.

Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Re: Search and move files

Post by Alfke » 31 Jan 2017, 22:22

In this case I'm using filebot for tv show renaming only, never for movies so my problem now is I have my sort folder with 8 episodes from 8 different tv shows correctly named, however I have to manually drop each episode into it's own show. I do this daily for new episodes. I'm trying to find a way for a script to do this.
Licensed User

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

Re: Search and move files

Post by rednoah » 01 Feb 2017, 06:59

Yes. Have you tried the command I gave you?

Code: Select all

filebot -rename -r /sorting -non-strict --db TheTVDB --output /tv --format {plex}
Look at the output. In what way does it not do what you want to do?
:idea: Please read the FAQ and How to Request Help.

Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Re: Search and move files

Post by Alfke » 01 Feb 2017, 18:34

Using that command, here are my results:
Filebot created a new folder structure: /nas/plex/tv/TV Shows/Fantasy Island/Season 5
I needed this file should go to: /nas/plex/tv/fantasy island/season 5

So my structure is slightly different than what Plex uses. Is it possible to have filebot use custom paths?
Licensed User

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

Re: Search and move files

Post by rednoah » 01 Feb 2017, 18:42

Alfke wrote:Is it possible to have filebot use custom paths?
Yes. Please read FAQ #1 and learn how format expressions work.
:idea: Please read the FAQ and How to Request Help.

Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Re: Search and move files

Post by Alfke » 01 Feb 2017, 20:01

I think I'm close, but now I'm receiving this error: "-" is not a valid option

Here is my command: filebot -rename /nas/sort_tv/ --db thetvdb -non-strict --output /nas/plex/tv --format {n}/season {s}/{n} - {s00e00}
Licensed User

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

Re: Search and move files

Post by rednoah » 01 Feb 2017, 20:03

:idea: Please read the FAQ and How to Request Help.

Alfke
Posts: 23
Joined: 24 Jan 2017, 18:11

Re: Search and move files

Post by Alfke » 01 Feb 2017, 21:48

Ok, I got it all to work. Thanks for the links!
Licensed User

Post Reply