Page 1 of 1

Any Mass Renaming

Posted: 08 Feb 2012, 07:58
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)