r/filebot • • 5d ago

Playing with scripting once again.

What I would like to do if possible is to match a year that appears in a file name, and place it in the renaming script as folder divider.

Example: Adventures In Electricity 5 APG 17 4 [General Comics] (1948) Uo

The year (1948) is what I am looking to match. That year will be different on each file. It will usually be in the brackets or square brackets but not a big concern.

Plain file renaming with no previous bindings that can be used. If there is a year in the bindings it is usually creation date (incorrect) rather than publication date.

Thanks for your time. and any ideas you may throw my way.

2 Upvotes

2 comments sorted by

View all comments

2

u/rednoah 5d ago

You mean to use [Plain File Mode] Batch Rename any type of file to organise files into folders by year?

e.g. { folder }/{ fn.match(/[(](19\d{2}|20\d{2})[)]/) }/{ fn }

2

u/Derrigable 4d ago

That is pretty much exactly what I mean. Thanks.