Get the Name of the Folder where the Files are

Support for Ubuntu and other Desktop Linux distributions
Post Reply
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Get the Name of the Folder where the Files are

Post by All4get »

Good evening,
first of all english is not my native language, so sorry for any misspelling.

Is it possible that FileBot uses the Name of the Folder to search in TheTVDB?

I got a Folder that has the name:

Code: Select all

/The.OA.S01.German.DD51.DL.1080p.NetflixUHD.x264-TVS - Black sagt danke! -

the media files inside of that:

Code: Select all

tvs-oa-dd51-dl-18p-nfuhd-x264-101.mkv
And filebot detects only [oa nfuhd].

Also I got a Folder that has the Name:

Code: Select all

TheAffair.s01.PW3
But the Files inside are labeled:

Code: Select all

S01E01.Episode 1.mp4
So is it possible to search for the Folder Name, if the Filename doesnt work?

I work with the CLI and I use the following command:

Code: Select all

/opt/share/filebot/filebot.sh -script fn:renall "/media/HDD01/Serien2" -r --output "/media/HDD01/Test2/Serien2/" --format "{n}/{n} - {s00e00} - {t}{movie}" -non-strict --lang de --action test >> /home/pi/Change/LogFiles/TEST/LogFileRename.$(date +%x_%T).txt
Thats the Output:

Code: Select all

Rename episodes using [TheTVDB]
Auto-detected query: [Bates Motel]
Fetching episode data for [Bates Motel]
Auto-detected query: [Bates Motel]
Fetching episode data for [Bates Motel]
Stripping invalid characters from new path: Bates Motel/Bates Motel - S01E03 - Was stimmt nicht mit Norman?
Stripping invalid characters from new path: Bates Motel/Bates Motel - S01E03 - Was stimmt nicht mit Norman?
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e01.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E01 - Erst der Traum, dann der Tod.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e02.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E02 - Nette Stadt, Norma ….mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e03.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E03 - Was stimmt nicht mit Norman.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e04.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E04 - Sie können mir vertrauen.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e05.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E05 - Noch bevor die Hoffnung stirbt.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e06.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E06 - Doch in Wahrheit ….mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e07.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E07 - Der Mann in Zimmer 9.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e08.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E08 - Ein Junge und sein Hund.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e09.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E09 - Eine Frau und ihre Verzweifelung.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e10.german.dl.1080p.bluray.x264-intention.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E10 - Mitternacht.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e01.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E01 - Erst der Traum, dann der Tod.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e02.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E02 - Nette Stadt, Norma ….mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e03.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E03 - Was stimmt nicht mit Norman.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e04.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E04 - Sie können mir vertrauen.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e05.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E05 - Noch bevor die Hoffnung stirbt.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e06.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E06 - Doch in Wahrheit ….mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e07.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E07 - Der Mann in Zimmer 9.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e08.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E08 - Ein Junge und sein Hund.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e09.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E09 - Eine Frau und ihre Verzweifelung.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e10.german.dl.1080p.bluray.x264-intention.sample.mkv] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E10 - Mitternacht.mkv]
[TEST] Rename [/media/HDD01/Serien2/Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK/bates.motel.s01e01.german.dl.1080p.bluray.x264-intention.proof.jpg] to [/media/HDD01/Test2/Serien2/Bates Motel/Bates Motel - S01E01 - Erst der Traum, dann der Tod.jpg]
Processed 21 files
Rename episodes using [TheTVDB]
Auto-detected query: [Empire 2015, empire]
Fetching episode data for [Empire (2015)]
Fetching episode data for [Empire (2012)]
Fetching episode data for [Empire (2005)]
Fetching episode data for [Empire]
Fetching episode data for [Empires]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x01 - Pilot.mkv] to [/media/HDD01/Test2/Serien2/Empire (2012)/Empire (2012) - S01E01 - A Taste for Power.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x02 - The Outspoken King.mkv] to [/media/HDD01/Test2/Serien2/Empire (2012)/Empire (2012) - S01E02 - Making Ourselves at Home.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x03 - The Devil Quotes Scripture.mkv] to [/media/HDD01/Test2/Serien2/Empire (2012)/Empire (2012) - S01E03 - Playing The Game.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x04 - False Imposition.mkv] to [/media/HDD01/Test2/Serien2/Empire (2012)/Empire (2012) - S01E04 - Making a Fortune.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x05 - Dangerous Bonds.mkv] to [/media/HDD01/Test2/Serien2/Empire (2012)/Empire (2012) - S01E05 - Doing Good.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x06 - Out, Damned Spot.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E06 - Die Wahrheit, nichts als die Wahrheit.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x07 - Our Dancing Days.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E07 - Bittersüße Erinnerung & The Fire Dancer.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x08 - The Lyon's Roar.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E08 - Das Brüllen des Löwen & The Tall Shadow.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x09 - Unto the Breach.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E09 - Der Krieg beginnt & The Earth Mover.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x10 - Sins of the Father.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E10 - Die Sünden des Vaters & Pressure Lock.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x11 - Die But Once.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E11 - Die Auferstehung & Echo of a Man.mkv]
[TEST] Rename [/media/HDD01/Serien2/Emp1108-TVP/Empire (2015) - 1x12 - Who I Am.mkv] to [/media/HDD01/Test2/Serien2/Empire/Empire - S01E12 - Feinde und Verräter & When the Gods Laugh.mkv]
Processed 12 files
Rename episodes using [TheTVDB]
Auto-detected query: [Humans]
Fetching episode data for [Humans]
Fetching episode data for [Real Humans]
Fetching episode data for [Humans Mutants]
Fetching episode data for [Humans & Households]
[TEST] Rename [/media/HDD01/Serien2/Humans.S01.German.DD20.Dubbed.DL.1080p.BD.x264-TVS - serienJK/Humans - 1x01 - Episode 1.mkv] to [/media/HDD01/Test2/Serien2/Humans/Humans - S01E01 - Aktiviert.mkv]
[TEST] Rename [/media/HDD01/Serien2/Humans.S01.German.DD20.Dubbed.DL.1080p.BD.x264-TVS - serienJK/Humans - 1x02 - Episode 2.mkv] to [/media/HDD01/Test2/Serien2/Humans/Humans - S01E02 - Einer von denen.mkv]
Processed 2 files
Rename episodes using [TheTVDB]
Auto-detected query: [Lucifer]
Fetching episode data for [Lucifer]
Fetching episode data for [Comet Lucifer]
[TEST] Rename [/media/HDD01/Serien2/TEST2/Lucifer/Lucifer - S01E01 - Die teuflische Auszeit.mkv] to [/media/HDD01/Test2/Serien2/Lucifer/Lucifer - S01E01 - Die teuflische Auszeit.mkv]
Processed 1 files
Rename episodes using [TheTVDB]
Auto-detected query: [The Night Of, the night of azhd]
Fetching episode data for [The Night Of]
Fetching episode data for [Næturvaktin]
Fetching episode data for [The Night Shift]
Fetching episode data for [The Night Manager]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-101.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E01 - An den Strand.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-102.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E02 - Ein raffiniertes Biest.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-103.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E03 - Herz in der Finsternis.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-104.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E04 - Die Kunst des Krieges.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-105.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E05 - Bewährungsprobe.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-106.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E06 - Wunderheiler.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-107.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E07 - Das vierte Messer.mkv]
[TEST] Rename [/media/HDD01/Serien2/The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK/tvs-the-night-of-dd51-sed-dl-18p-azhd-x264-108.mkv] to [/media/HDD01/Test2/Serien2/The Night Of/The Night Of - S01E08 - Der Ruf der Wildnis.mkv]
Processed 8 files
Rename episodes using [TheTVDB]
Auto-detected query: [oa nfuhd]
Rename episodes using [TheTVDB]
Auto-detected query: []
Done ヾ(@⌒ー⌒@)ノ
I have also a generall question: If there are 2 files from the same Series (Different Names) does it skip one file?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

1.
How did you confirm that FileBot does not use the folder name (it does) other than testing on one single file of one single series that may or may not work for other reasons?

"OA" won't well because TV Shows with 1-2 letters don't work well. "TheAffair" doesn't work well because that query doesn't match "The Affair" nor "Affair". Word separation is essential for most search algorithms.


2.
How does this make sense? Or is it just random copy & paste mistake?

Code: Select all

{n}/{n} - {s00e00} - {t}{movie}

3.
I don't know what FileBot will be doing for any given test case. If you give me a test cases, then I'll run some tests and then tell you what it's doing. :lol:
:idea: Please read the FAQ and How to Request Help.
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Re: Get the Name of the Folder where the Files are

Post by All4get »

rednoah wrote:1. other than testing on one single file of one single series
Ofcourse i didnt tried it on only 1 file each Series.
The OA has 8 Episodes, everyone of them is labeled like that:

Code: Select all

tvs-the oa-dd51-dl-18p-nfuhd-x264-101.mkv
tvs-the oa-dd51-dl-18p-nfuhd-x264-102.mkv
tvs-the oa-dd51-dl-18p-nfuhd-x264-103.mkv
tvs-the oa-dd51-dl-18p-nfuhd-x264-104.mkv
....
But FileBot Scans for oa nfuhd, i think - if it would search with the Folder Name, wouldnt it search with:

Code: Select all

The.OA.S01.German.DD51.DL.1080p.NetflixUHD.x264-TVS - Black sagt danke!
?
rednoah wrote: "TheAffair" doesn't work well because that query doesn't match "The Affair" nor "Affair". Word separation is essential for most search algorithms.
I see - these Files/Folders should I better rename manuell?
rednoah wrote: 2.
How does this make sense? Or is it just random copy & paste mistake?

Code: Select all

{n}/{n} - {s00e00} - {t}{movie}
With that format i'am able to make a Subfolder with the Name of the Series/Movie.
I also tried it that way:

Code: Select all

/opt/share/filebot/filebot.sh -script fn:renall "/media/HDD01/Serien2/" -r --output "/media/HDD01/Test2/Serien2/{n}" --format "{n} - {s00e00} - {t}{movie}" -non-strict --lang de --action test >> /home/pi/Change/LogFiles/TEST/LogFileRename.$(date +%x_%T).txt
rednoah wrote:3.
I don't know what FileBot will be doing for any given test case. If you give me a test cases, then I'll run some tests and then tell you what it's doing. :lol:
Thanks for the offer - but dont know what u really need - would be great if you could specify that.
Currently iam downloading my Files into 2 seperate Folders (Movies and Series). These Downloads are Archives - Movies getting extracted to an another Path and the Same with Series. Example:

Download Movies and Series into that Path:

Code: Select all

/var/media/HDD01/BackUps/Movies 
/var/media/HDD01/BackUps/Series
And from that Path it gets extracted to:

Code: Select all

/var/media/HDD01/Filme2
/var/media/HDD01/Serien2
So - now are inside of HDD01/Filme2 AND HDD01/Serien2 some Folders, for example Series:

Code: Select all

The.OA.S01.German.DD51.DL.1080p.NetflixUHD.x264-TVS - Black sagt danke!
TheAffair.s01.PW3
Bates.Motel.S01.German.DL.1080p.BluRay.x264-iNTENTiON - serienJK
Emp1108-TVP
The.Night.Of.S01.German.DD+51.Synced.DL.1080p.AmazonHD.x264-TVS - serienJK
And inside of the Folders are my Media Files - mostly only .mkv's/.avi's/-mp4's.
It finds Bates Motel, Emp(Empire), The Night of - renames it - everything is great, but not the first 2 Series.
And with my Command I want to rename the Folders (Most Important) and the Files.
I hope it helps - would be great if we can find a solution and maybe tweak my command.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

1.
That specific file pattern with that specific series doesn't work, but it might start working in the future. In the meanwhile you'll have to do it semi-manually by manually entering the search query. See FAQ #2.


2.
It only happens to kinda work because {movie} errors out and the rest is just {n} - {s00e00} - {t}. If you use that format on movies where only {s00e00} errors out you'll end up with something really weird.

The correct usage would look like this:

Code: Select all

{n} - {s00e00} - {t}
If you want to organize files into a folder structure you'd use something like this:

Code: Select all

TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}
See FAQ #1.

However, the predefined {plex} binding might be easier:

Code: Select all

{plex}
See FAQ #1


3.
Posting the file paths as text will be just fine if you find files that don't work. You already gave me more than most to work on. Thanks!


4.
I don't think you have any good reason to use the renall script instead of a simple -rename call. Having said that, you probably wanna look into the amc script just in case.
:idea: Please read the FAQ and How to Request Help.
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Re: Get the Name of the Folder where the Files are

Post by All4get »

rednoah wrote:1.
That specific file pattern with that specific series doesn't work, but it might start working in the future. In the meanwhile you'll have to do it semi-manually by manually entering the search query. See FAQ #2.
Thanks for the hint - could help me, will look into that.
rednoah wrote: It only happens to kinda work because {movie} errors out and the rest is just {n} - {s00e00} - {t}. If you use that format on movies where only {s00e00} errors out you'll end up with something really weird.

The correct usage would look like this:

Code: Select all

{n} - {s00e00} - {t}
If you want to organize files into a folder structure you'd use something like this:

Code: Select all

TV Shows/{n}/Season {s.pad(2)}/{n} - {s00e00} - {t}
See FAQ #1.
Ah, u meant the {movie} part and not the {n}/{n} part.
With {n}/{n} I was able to create a Folder with the Name of the Movie/Series.
And I tought movie need to be added because he will write only "Name S*E* Episode" without .mkv/.avi
rednoah wrote: 4.
I don't think you have any good reason to use the renall script instead of a simple -rename call. Having said that, you probably wanna look into the amc script just in case.
The same here: I tought renall will go into all Subfolders and rename all the files - isnt that true? Will "rename" also rename the files inside of subfolders?
One more thing: If FileBot failes to find matches, it looks like it skips the following folders.
For example:
Folder1 = All good
Folder2 = All good
Folder3(Example the oa Files) = Failed
Folder4 = Doesnt even search?
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

renall is like calling -rename multiple times recursively on each individual folder, however since you set the -r flag the input arguments are already resolved recursively before being passed onto the script and thus the renall script is effectively called on a set of individual files instead of one root folder that is then traversed recursively by the script.

Long story short, -script fn:renall -r is effectively the same as -rename -r but slow, but without -r the behaviour will be different depending on your your input folder is organized.
:idea: Please read the FAQ and How to Request Help.
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Re: Get the Name of the Folder where the Files are

Post by All4get »

rednoah wrote: Long story short, -script fn:renall -r is effectively the same as -rename -r but slow, but without -r the behaviour will be different depending on your your input folder is organized.
Thanks for the clarification - will change it to -rename -r.

One more thing - is it possible to just add a Series to the matching list instead of just forcing it?
For example:

With

Code: Select all

--q "The OA"
iam able to force the matching. With that way iam able to find the Files:

Code: Select all

tvs-oa-dd51-dl-18p-nfuhd-x264-101.mkv
But if I search for the OA and for other Season at the Same time (They are all in the same Folder), the other Series are forced to watch for "The OA".
I hope I described it well enough - tried it allready with the filter function and include.txt file, seemed not to working.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

You can write your own script that calls FileBot with --q "The OA" for all the "The OA" files and without --q for all the other files. You don't have to pass in a folder, and pass in a set of files instead. You'll need some basic bash skills for that though.

@see viewtopic.php?f=3&t=4222
:idea: Please read the FAQ and How to Request Help.
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Re: Get the Name of the Folder where the Files are

Post by All4get »

Hey,

I have a new Question regarding Files with ö ü ä that should be renamed.

I Have the File:

Code: Select all

Goliath S01E07 Schöne und das Biest German DD5.1 DL 1080p AmazonHD x264-Mooi1990.mkv
Thats the only File in the Path: /media/HDD01/Serien2

If I run the CLI Command:

Code: Select all

/opt/share/filebot/filebot.sh -script fn:renall "/media/HDD01/Serien2" --output "/media/HDD01/Serien3/" --format "{n}/Season {s}/{n} - {s00e00} - {t}" -non-strict --lang de --action test
It will simply say

Code: Select all

"Done ヾ(@⌒ー⌒@)ノ"
But If i Rename my File from

Code: Select all

Goliath S01E07 Schöne und das Biest German DD5.1 DL 1080p AmazonHD x264-Mooi1990.mkv
TO

Code: Select all

Goliath S01E07 Schone und das Biest German DD5.1 DL 1080p AmazonHD x264-Mooi1990.mkv
It will find that file, rename it and move it.

I saw that i could use asci(), but iam not sure that this will help me, because that is only for the output?
But Filebot doenst even find my File with ö - so there is nothing to be outputed.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

Thanks for the post! Before a real human comes by, please make sure your report has all the following points checked:
  • What are you trying to do achieve? What's not working? What have you tried so far?
  • Include screenshots, logs or filenames (i.e. demonstrate the issue)
  • Include basic information (i.e. sysinfo output)
:idea: Please read How to Request Help and Fix Problems, Report Bugs, Get Features
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22995
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Get the Name of the Folder where the Files are

Post by rednoah »

Make sure that filesystem encoding used by Java is set to UTF-8 and that whatever filenames you have are also encoded in UTF-8.

@see http://unix.stackexchange.com/a/2111/78608


PS: I recommend using simple -rename calls or amc calls instead of renall calls.
:idea: Please read the FAQ and How to Request Help.
All4get
Posts: 11
Joined: 20 Dec 2016, 19:55

Re: Get the Name of the Folder where the Files are

Post by All4get »

rednoah wrote:PS: I recommend using simple -rename calls or amc calls instead of renall calls.
I had the feeling that -rename -r doesnt go into subfolders - I tested it after you said that -renall -r is not necessery.
With renall everything worked fine so far. I also use the amc script for a folder where are both movie files and series, works great - dont know why I dont use it also on Folders where only Series and Movies are.

Thanks for the Tipp and the link, will look into that.
Post Reply