1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-05 08:55:08 -05:00
filebot/website/scripts/housekeeping.groovy
2012-07-21 20:35:13 +00:00

21 lines
506 B
Groovy

// filebot -script fn:housekeeping /path/to/folder/ --output /output/folder/ --format <expression>
/*
* Watch folder for new tv shows and automatically move/rename new episodes
*/
// check for new media files once every 5 minutes
def updateFrequency = 5 * 60 * 1000
// spawn daemon thread
Thread.startDaemon {
while (sleep(updateFrequency) || true) {
args.eachMediaFolder {
rename(folder:it)
}
}
}
println "Press ENTER to abort"
console.readLine() // keep script running until aborted by user