Rename my training tutorial

Support for macOS users
Post Reply
Lily
Posts: 7
Joined: 19 May 2024, 08:05

Rename my training tutorial

Post by Lily »

I want to use Filebot to rename my training tutorials which have no media data into a plex format and I discovered that there is a plain file mode but I don't have adequate knowledge to tweak the format just right. So it isn't giving me the right result. Please any help will be appreciated.

https://imgur.com/a/JZ8oVhx
https://pastebin.com/6mEJZgEf

Note: I just noticed you have an app in Synology NAS, I still like using the Synology Drive to make changes to the folders because using Synology Operating System is slower than I am used to.
User avatar
rednoah
The Source
Posts: 23242
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename my training tutorial

Post by rednoah »

:arrow: Original Post: https://www.reddit.com/r/filebot/commen ... tutorials/


:arrow: General Help: Organize files based on information present in the file path and How do I prototype a plain file format for renaming and reorganizing generic files?



:idea: You can use a format like this:

Format: Select all

{
	# take the parent parent folder name; remove [...] and (...)
	def n = folder.dir.name.removeAll(/\[.+?\]/).removeAll(/\(.+?\)/)
	# take the first number from the parent folder name
	def s = folder.name.match(/\d+/)
	# take the first number from file name
	def e = fn.match(/\d+/)
	# take the text after the first number from the file name
	def t = fn.after(/\d+/)

	"$n/Season $s/$n - S${s}E${e} - $t"
}
to rewrite file paths like this:

Code: Select all

[Class101] Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 (Korean, Eng sub)/Season 01-Welcome!/01 Meet Your Instructor 43!.mp4
[Class101] Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 (Korean, Eng sub)/Season 01-Welcome!/02 Introduction to the Course.mp4
[Class101] Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 (Korean, Eng sub)/Season 01-Welcome!/03 Introduction to the Materials.mp4
into file paths like this:

Code: Select all

Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43/Season 01/Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 - S01E01 - Meet Your Instructor 43!
Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43/Season 01/Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 - S01E02 - Introduction to the Course
Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43/Season 01/Fairy-Tale, Cotton Candy-like iPad Illustration Techniques by 43 - S01E03 - Introduction to the Materials




Lily wrote: 19 May 2024, 08:50 Note: I just noticed you have an app in Synology NAS, I still like using the Synology Drive to make changes to the folders because using Synology Operating System is slower than I am used to.
Note that there is no beginner-friendly WebUI for Plain File Mode. You can however use filebot on the command-line via SSH if you must process files locally. I'd use the Desktop application and rename files via network shares though, for convenience since it's a one-off task.
:idea: Please read the FAQ and How to Request Help.
Lily
Posts: 7
Joined: 19 May 2024, 08:05

Re: Rename my training tutorial

Post by Lily »

Thank you for the help. An new problem occured which is changing location. I wanted the video renamed to be in the same place but the location changes.
Original Location:
https://pastebin.com/KzGLQc3m

Proposed New Location:
https://imgur.com/a/d3sGekk

So it is almost accurate but it moves away from the Art folder.

Note: The reason why it's not in Cloud Storage is that it also had the same problem of the location changing, so I tried my network server, and got same problem. Case in point:
https://imgur.com/a/82WGS98

Any help will be appreciated. Thanks.
Lily
Posts: 7
Joined: 19 May 2024, 08:05

Re: Rename my training tutorial

Post by Lily »

Also is there a video tutorial on how to do specific formatting so I could fix the other videos myself?
User avatar
rednoah
The Source
Posts: 23242
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename my training tutorial

Post by rednoah »

:idea: The format above will generate a relative file path. FileBot does not know relative to where, and will thus guess. If your format generates the absolute file path you want, then FileBot will use just that. Since you did not tell us the absolute target file path you want, we could not give you a custom format that generates the absolute target file path you want.


:idea: You can use the the current file path in your format to generate the desired absolute target file path:

Format: Select all

{
	# absolute file path of the parent parent parent folder (e.g. Art folder)
	folder.dir.dir
}
/
{
	def n = folder.dir.name.removeAll(/\[.+?\]/).removeAll(/\(.+?\)/)
	def s = folder.name.match(/\d+/)
	def e = fn.match(/\d+/)
	def t = fn.after(/\d+/)

	"$n/Season $s/$n - S${s}E${e} - $t"
}

:idea: You can also just specify where you want things to go without variables:

Format: Select all

/path/to/Tutorials/Art/
{
	def n = folder.dir.name.removeAll(/\[.+?\]/).removeAll(/\(.+?\)/)
	def s = folder.name.match(/\d+/)
	def e = fn.match(/\d+/)
	def t = fn.after(/\d+/)

	"$n/Season $s/$n - S${s}E${e} - $t"
}


:idea: The How do I prototype a plain file format for renaming and reorganizing generic files? video tutorial does cover the process of prototyping a custom format. The specific use case in this video is of course not your use case, but the concept is the same.
:idea: Please read the FAQ and How to Request Help.
Lily
Posts: 7
Joined: 19 May 2024, 08:05

Re: Rename my training tutorial

Post by Lily »

It works, thank you. I am beginning to recognize that I would have to learn Groovy to make my own format for each tutorial. I just checked and it is similar to java language. So I guess this is not for me. Thank for your assistance though.
User avatar
rednoah
The Source
Posts: 23242
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename my training tutorial

Post by rednoah »

The examples above will give you all the building blocks you need, file / folder names, before pattern, after pattern, match pattern, remove pattern, etc. You do not need to learn or know about Java / Groovy to use and modify the examples. A bit of regex pattern basics will be very helpful though.
:idea: Please read the FAQ and How to Request Help.
Lily
Posts: 7
Joined: 19 May 2024, 08:05

Re: Rename my training tutorial

Post by Lily »

Can i ask for a format that just adds Season and Episodes increment before the title.
For Example: vid 01, vid 04 => S01E01-vid 01, S01E02-vid 04. I know for Season Number will be based on Season Number name folder but what about the episode number, can it be incremental?
User avatar
rednoah
The Source
Posts: 23242
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Rename my training tutorial

Post by rednoah »

{i} will give you the incremental number. {fn} will give you the current file name.

Format: Select all

S01E{i.pad(2)}-{fn}
See Rename photos for example.
:idea: Please read the FAQ and How to Request Help.
Post Reply