[Plain File Mode] Match custom patterns and rewrite file paths

All about user-defined episode / movie format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 20484
Joined: 16 Nov 2011, 08:59

[Plain File Mode] Match custom patterns and rewrite file paths

Post by rednoah »

Use Case:

Rename generic Sports episodes that are not listed on TheTVDB or TheMovieDB.

e.g. custom Plain File Format:

Code: Select all

/sports
/{ fn.match(/NBA|NHL/) }
/{ f.lastModified().toDate().format('MMMM') }
/{ fn.match(/\d{4}.\d{2}.\d{2}/).space('-') }
-{ fn.match( /\[email protected]\w+/ )}

e.g. sample files:
e.g. desired output file paths:

Code: Select all

/sports/NBA/December/[email protected]
/sports/NHL/December/[email protected]

Image


Image
:idea: Please read the FAQ and How to Request Help.
Post Reply