Moving ALL files in subfolder to named parent folder

Any questions? Need some help?
Post Reply
cagenuts
Posts: 17
Joined: 28 Nov 2021, 17:20

Moving ALL files in subfolder to named parent folder

Post by cagenuts »

I routinely collate individual TV show episodes into a season/series pack.

For seeding purposes I don't rename the actual files but just create a new root folder for that season/series.

Here is my GUI script;

Code: Select all

../{n.replaceAll(/[:|]/, "ː").replace('/' : '⁄')} - {episode.special ? 'Specials ' : 'Series '+s.pad(1)} {sy.joining('-', '(', ')')} [{ '' + any{ "$vs".upper() }{ 'WEB-DL' } } {vf} {ext}{if (textLanguages) ' subs'}]/{fn}
This is what the new folders look like;

Code: Select all

Attenborough's Life in Colour - Series 1 (2021) [WEB-DL 480p mp4]

Code: Select all

Attenborough's Life in Colour - Series 1 (2021) [WEB-DL 480p srt]

Code: Select all

Attenborough's Life in Colour - Series 1 (2021) [WEB-DL 480p txt]
Ideally I would like ALL the files lumped together in the folder which references the container type, in this case mp4.

Code: Select all

Attenborough's Life in Colour - Series 1 (2021) [WEB-DL 480p mp4]
Is this possible? At the moment I just move them manually but I would prefer it to be done via FB.

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

Re: Moving ALL files in subfolder to named parent folder

Post by rednoah »

Well, if you use hardlinks, then you can have both "original files" and "organized files" (i.e. the same file at multiple file paths) so why not process files like that? So keep the original files seeding at the original location untouched, and then create hardlinks in a new structure however you see fit.


:idea: Same idea has here, except that you start hardlinking from the very beginning, and not just when providing the same files via different folder structures for different client applications:
viewtopic.php?t=13056


As far as your original question is concerned, you can rewrite the file path in whichever way you please, and your custom format may generate a file path where the new file name happens to be the same as the old one:
https://www.filebot.net/naming.html


:idea: Plain File Mode is particularly useful if you just want to rewrite files based on local information only (i.e. current file path / file name / media information) which seems to be mostly what you're looking for. The Attenborough's Life in Colour - Series 1 part you can probably extract from the current file path or hardcode in your custom format.


e.g.

Code: Select all

X:/Media Folders/Attenborough's Life in Colour - Series 1 (2021) [{vs} {vf}]/{fn}
:idea: Please read the FAQ and How to Request Help.
cagenuts
Posts: 17
Joined: 28 Nov 2021, 17:20

Re: Moving ALL files in subfolder to named parent folder

Post by cagenuts »

Thanks, I'll take a look. Perhaps I could also only process the video files and tick the 'Import Companion Files' and see if that just moves the other file types.
Post Reply