Trying to hardlink and rename files using CLI

Support for Ubuntu and other Desktop Linux distributions
Post Reply
SuissoNaBisso
Posts: 3
Joined: 15 Mar 2019, 09:44

Trying to hardlink and rename files using CLI

Post by SuissoNaBisso »

Hi all

Just purchased filebot and using it on Ubuntu.
I have a folder /home/USERNAME/torrents/rtorrent/ultrahd in which all my movies are and need to rename them and hardlink using the format "{home}/Media/{plex}" and so moving the hardlinks to /home/USERNAME/Media/Movies.
Please note some of my movies in rtorrent/ultrahd may be contained within a subfolder as well:

Code: Select all

    e.i 1   rotorrent/ultrahd/Avatar.UHD/Avatar.UHD.mkv
    e.i 2   rtorrent/ultrahd/The.Matrix.UHD.mkv
I tried both commands :

Code: Select all

filebot --action hardlink /home/suissonabisso/torrents/rtorrent/ultrahd --db TheMovieDB --lang fr -non-strict --output /home/suissonabisso/Media/Movies

Code: Select all

filebot --action hardlink /home/suissonabisso/torrents/rtorrent/ultrahd --db TheMovieDB --lang fr -non-strict --format {home}/Media/{plex}
but none of them is working...

EDIT: forgot to mention that the result is just that I get the filebot command line menu...

Is there anyone to help please ?
I was initially using GUI through x2go or noVNC but everytime filebot does not respond while fetching movies with db...so have to deal with the CLI now.

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

Re: Trying to hardlink and rename files using CLI

Post by rednoah »

Looks like you’re missing the -rename switch.

The -r flag might also be useful if you want to process all files recursively contained within the given folder.

You can get started by looking at the docs here:
https://www.filebot.net/cli.html
:idea: Please read the FAQ and How to Request Help.
SuissoNaBisso
Posts: 3
Joined: 15 Mar 2019, 09:44

Re: Trying to hardlink and rename files using CLI

Post by SuissoNaBisso »

@rednoah
so do you mean I should use something like this ?

Code: Select all

filebot -rename --action hardlink -r /home/suissonabisso/torrents/rtorrent/ultrahd --db TheMovieDB --lang fr -non-strict --format {home}/Media/{plex}
SuissoNaBisso
Posts: 3
Joined: 15 Mar 2019, 09:44

Re: Trying to hardlink and rename files using CLI

Post by SuissoNaBisso »

it worked ! thanks so much
User avatar
rednoah
The Source
Posts: 22980
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to hardlink and rename files using CLI

Post by rednoah »

That should do it.

If you're processing files via SSH remotely, but still want a little bit of user-interaction, then you can add --mode interactive as well.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22980
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Trying to hardlink and rename files using CLI

Post by rednoah »

Here's how I'd write it:

Code: Select all

filebot -rename -r "$HOME/torrents/rtorrent/ultrahd" -non-strict --db TheMovieDB --lang French --action hardlink --output "$HOME/Media" --format "{plex}"
:idea: Please read the FAQ and How to Request Help.
Post Reply