1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-13 04:45:01 -05:00
filebot/website/data/shell/mvrn.groovy
2011-11-03 05:50:57 +00:00

20 lines
599 B
Groovy

// filebot -script "http://filebot.sourceforge.net/data/shell/mvrn.groovy" --format "{n}/{n} - {'S'+s.pad(2)}E{e.pad(2)} - {t}" --db thetvdb <source folder> <destination folder>
// sanity check
require { args.size == 2 && _args.format && _args.db }
// handle arguments
def source = args[0]
def destination = args[1] + _args.format
println 'Source Folder: ' + source
println 'Target Format: ' + destination.path
/*
* Move/Rename videos from source folder into destination folder
*/
source.eachMediaFolder {
println 'Processing ' + it
rename(folder:it, format:destination.path, db:_args.db)
}