Any Mass Renaming

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Any Mass Renaming

Post by rednoah »

You can use scripting to do any kind of mass-renaming. Especially useful if you wanna add mediainfo to the filename like in this example here:

1. List video files
2. Rename files according to the given naming scheme (in this case keep existing name/extension but insert resolution in between)
3. Print new file paths

Code: Select all

args.getFiles{ it.isVideo() }.each {
   println it.moveTo(new File(getMediaInfo(file:it, format:"{fn} [{resolution}].{ext}")))
}
(requires -trust-script for filesystem write access)
:idea: Please read the FAQ and How to Request Help.
Post Reply