Parent Folder with different Files

All about user-defined episode / movie / file name format expressions
Post Reply
Partino
Posts: 7
Joined: 01 Oct 2016, 09:06

Parent Folder with different Files

Post by Partino »

So. I was thinking that it would be neat to leave the filenames in it's clearest state - meaning

Code: Select all

{n.replace(":", " -").sortName('$2, $1')} - {s00e00} - {t.replace(":", " -")}
and it's parent folder with all the other information.

This is my current formula:

Code: Select all

/Volumes/TV Shows/{n.replace(":", " -").sortName('$2, $1')} {info.status == 'Ended' ? '[Completed]' : '[Ongoing]'}/{'Season '+s.pad(2)} {'['+vf}{', '+ac.replace("EAC3", " DD+").replace("AC3", " DD")}{' '+channels.replace("6.0", " 5.1")+']'} {'('+source+')'}/
But the Problem is with this formula, that if I have, say, one show with all the episodes but some weren't released (yet) in a specific format but I still want them to have in the same folder, that it generates a separate folder for the "odd" files.

Meaning this happens:

Image

Soooooo.... HELP ME PLEASE! :'(
User avatar
rednoah
The Source
Posts: 23050
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Parent Folder with different Files

Post by rednoah »

1.
So to know Path A you need to first know Path B, but to know Path B you first need to know Path A? Good luck with that! :lol: When faced with an impossible problem, you'll probably just need to find a way to cheat. ;)

How would you solve this problem? Please think about it step by step. Because you seem to be asking for something that isn't strictly (physically) possible (given the fact that FileBot can't do black hole see the future time travel magic). :lol:


2.
If you process all the files in one go then it might be possible. This thread might be interesting to you: viewtopic.php?f=5&t=4214

e.g.

Code: Select all

{model.vf}

3.
Check for existing folders in your format: viewtopic.php?f=5&t=2
rednoah wrote:Sort into drive with the most free space:

Code: Select all

{['C:', 'D:', 'E:'].collect{ (it+'/TV/'+n) as File }.sort{ a, b -> a.exists() <=> b.exists() ?: a.diskSpace <=> b.diskSpace }.last()}/{episode}
This format will always evaluate to a path to the drive with the most free space, unless the series folder already exists on one of the drives in which case it'll prefer the existing one.
:idea: Please read the FAQ and How to Request Help.
Partino
Posts: 7
Joined: 01 Oct 2016, 09:06

Re: Parent Folder with different Files

Post by Partino »

But black hole time travel magic is the future of technology - KEEP UP! :lol:

Well, let me explain it how my mind would solve this problem (without knowing anything about coding)

I have 3 Files from one show.

1. ABC - S01E01 - XYZ [1080p, DD+ 5.1] (WEB-DL).mkv
2. ABC - S01E02 - XYZ [720p, 2.0] (HDTV).mkv
3. ABC - S01E03 - XYZ [1080p, DD+ 5.1] (WEB-DL). mkv

with my formula I'd get two folders

ABC/Season 01 [1080p, DD+ 5.1] (WEB-DL)

and

ABC/Season 01 [720p, 2.0] (HDTV)

What I'd like to do is put all three files into a single folder which indicates that it has files from the same show, same season but different metadata.

Basically a formula which would put all those files into a single folder like this

ABC/Season 01 [1080p, 720p, DD+ 5.1, 2.0] (WEB-DL, HDTV)

I was thinking about fiddling with an if-then binding but gave up.

If Show, Season and Metadata is the same then put it in this folder (the one with my provided formula); if not put it still in the same folder as other files but add the additional metadata in the folder name.

Something like that :lol: :lol: :lol:
User avatar
rednoah
The Source
Posts: 23050
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Parent Folder with different Files

Post by rednoah »

Alright, that's the same as Option 2: viewtopic.php?f=5&t=4214

(you just need to remember that i'll only work if you process all files in the same batch)
:idea: Please read the FAQ and How to Request Help.
Post Reply