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

All about user-defined episode / movie / file name format expressions
Post Reply
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[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:

Format: Select all

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

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

Console Output: Select all

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


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