Trying to combine these two...
Posted: 18 Apr 2013, 18:45
Current TV renaming scheme:
I'd like to add this code to have it put the series on the drive with the most space if the Series doesn't already exist on one of them:
Tried multiple times to combine them. Still want the renaming capability of the original script for naming the series folder.
Code: Select all
Y:/Videos/TV/{def a; new File('Y:/incoming/scripts/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()}/{"Season"} {s.pad(2)}/{def a; new File('Y:/incoming/scripts/names.csv').splitEachLine(';'){ if (n == it[0]) a = it[1]}; a ?: n.upperInitial().replaceTrailingBrackets()} - [{s.pad(2)}x{e.pad(2)}] - {t}
Code: Select all
{["T:", "Y:"].collect{"$it/Videos/TV/$n" as File}.sort{a,b -> a.exists() <=> b.exists() ?: a.root.freeSpace <=> b.root.freeSpace}.last()}/