Page 1 of 1

How to extract and rename?

Posted: 16 Apr 2012, 12:43
by xadox
I would like to extract rar files from a fix folder to a fix folder and rename them in one step.
Since I have no clue how to realise this it would be nice if someone can lend me a hand with it.

Re: How to extract and rename?

Posted: 16 Apr 2012, 12:55
by rednoah
filebot -extract /path/to/archives/ --output /output/folder/
&&
filebot -rename /output/folder/ --output /path/to/final/destination/

Re: How to extract and rename?

Posted: 17 Apr 2012, 05:38
by xadox
Thx. Is there also a way to extract the files to series name folders?

Currently I am extracting the files with WinRar. Then I move the files to the NAS in the right series folder. And finaly I rename them with FileBot.

Re: How to extract and rename?

Posted: 17 Apr 2012, 06:18
by rednoah
Extracting does't apply any special series/movie matching logic. You can script things the way you want if you really need to.

EDIT: FileBot can move files into any folder structure. Just define your template --format as absolute path. e.g. X:/TV/{n}/Season {s}/{episode}

Re: How to extract and rename?

Posted: 17 Apr 2012, 07:31
by xadox
Thx for the feedback.

Re: How to extract and rename?

Posted: 25 Sep 2019, 18:57
by onlinewurm
From a folder Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p I would like to extract the rar and rename in one step as a Goldene Hochzeit mit Handicap 2019.mkv.

Use FileBot_4.8.5

#!/bin/sh
filebot -extract /home/rar/ --output /home/folder/
filebot -rename /home/folder/ --output /home/final/

root@debian:/home/scripts# ./rar.sh
Read archive [muhhd-goldenehochzeitmithandicap-hdtv.rar] and extract to [/home/folder]
Extracting files [/home/folder/muhhd-goldenehochzeitmithandicap-hdtv.mkv]
"-rename/home/folder/" is not a valid option
root@debian:/home/scripts#

thanks for any help

Re: How to extract and rename?

Posted: 26 Sep 2019, 10:24
by rednoah
You can do filebot -extract -rename ... to perform extraction and renaming with a single filebot command. However, FileBot internally will still extract files and then rename them.


Note that the issue at hand is unrelated to your question. You're simply missing a <space> in your command:

Code: Select all

"-rename/home/folder/" is not a valid option
:arrow: Please read Cmdline and Argument Passing for details.

:!: The sh script you pasted is likely not exactly the same as the sh script that is being executed and produced this error message.

Re: How to extract and rename?

Posted: 26 Sep 2019, 21:36
by onlinewurm
thank you for your help
I got it with the unzip and rename
but one more question i have
I can set the path of the Extracting files myself

Re: How to extract and rename?

Posted: 27 Sep 2019, 03:17
by rednoah
The --output folder argument is used for that.

If you want different --output folder for -extract and -rename, then you'll have to make 2 separate filebot calls.

Re: How to extract and rename?

Posted: 27 Sep 2019, 14:37
by onlinewurm
Hi
As soon as I try to unpack with the amc-custom.groovy script, the path changes
I would like to put the Extracting files on the target server. And not on the source server

Code: Select all

root@debian:~# filebot -extract /home/rar/* --output /home/folder/
Read archive [muhhd-goldenehochzeitmithandicap-hdtv.rar] and extract to [/home/folder]
Extracting files [/home/folder/muhhd-goldenehochzeitmithandicap-hdtv.mkv]

Code: Select all

root@debian:~# filebot -extract /home/rar/* --output /home/folder/ -script /home/scripts/filebot-scripts/amc-custom.groovy
FROM custom amc - Run script [/home/scripts/filebot-scripts/amc-custom.groovy] at [Fri Sep 27 16:25:19 CEST 2019]
FROM custom amc - Log file [No log file]
FROM custom amc - tvDB: [TheTVDB]
FROM custom amc - EpisodeOrder: [Airdate]
FROM custom amc - Parameter: Language = [en_US]
FROM custom amc - Parameter: Override = [false]
FROM custom amc - Argument[0]: /home/rar/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD
FROM custom amc - Ignore extra: /home/rar/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD/Sample
FROM custom amc - Ignore hidden: /home/rar/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD/.message
Read archive [muhhd-goldenehochzeitmithandicap-hdtv.rar] and extract to [/home/rar/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD/muhhd-goldenehochzeitmithandicap-hdtv/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD]
Extracting files [/home/rar/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD/muhhd-goldenehochzeitmithandicap-hdtv/Goldene.Hochzeit.mit.Handicap.2019.GERMAN.720p.HDTV.x264-muhHD/muhhd-goldenehochzeitmithandicap-hdtv.mkv]

Re: How to extract and rename?

Posted: 28 Sep 2019, 03:04
by rednoah
If you're using filebot -script ... then you're not using filebot -extract ... so any answers that apply to filebot -extract ... calls may or may not apply to other commands, which may accept the same --options but interpret the values differently.


If you're using the amc script then you'll want read the Options section of the amc script manual page for additional configuration options:
rednoah wrote: 01 Aug 2012, 13:04 --def extractFolder=/path/to/folder Extract archives to this folder

Re: How to extract and rename?

Posted: 27 May 2020, 13:17
by Benj851
Is there a command to use filebot to extract recursively? Ex. Main folder > Folder1 > .rar1,.rar2 etc. Then Main folder > Folder 2> Folder 2a >rar1, rar2 etc.

Would it just be: filebot -extract /path/to/archives/* --output /output/folder/

Re: How to extract and rename?

Posted: 27 May 2020, 14:54
by rednoah
* is a shell thing, not a filebot thing.

-r is a filebot thing though:

Code: Select all

-r                                     : Recursively expand folders