Binding for destination folder?
Posted: 05 May 2014, 20:15
Is there a binding for the destination folder? My code looks like this
Which checks H:\videos\Kids TV Shows\ to see if the series exists there, if it does it uses that drive, if not it uses G:\videos\TV Shows\
All of that works great, however if it detects an HD file it appends (720p) to the Season folder name as well as the end of the file name itself. I only want it to do that if it detects that it needs to go to the G drive, if it uses the H drive just use the naming expression as is except for the {(' (')+vf.match(/720[pP]|1080[pP]/)+(')')} part. Is there a way to add an IF statement refering the the destination file.path[0]? or Something to that effect?
Code: Select all
{new File('H:/videos/Kids TV Shows/', n.replace(':',' -').replace('?','')).exists() ? 'H:/videos/Kids TV Shows/'+n.replace(':',' -').replace('?','') : 'G:/videos/TV Shows/'+n.replace(':',' -').replace('?','')}/{episode.special ? 'Special' : 'Season '+s}{(' (')+vf.match(/720[pP]|1080[pP]/)+(')')}/{n.replaceTrailingBrackets().replace(':',' -').replace('?','')} - S{s.pad(2)}E{es*.pad(2).join('-E').replaceAll('null',{episode.special ? special.pad(2):''})} - {t.replace(':',' -').replace('?','').replacePart (' (Part $1)')}{(' (')+vf.match(/720[pP]|1080[pP]/)+(')')}
All of that works great, however if it detects an HD file it appends (720p) to the Season folder name as well as the end of the file name itself. I only want it to do that if it detects that it needs to go to the G drive, if it uses the H drive just use the naming expression as is except for the {(' (')+vf.match(/720[pP]|1080[pP]/)+(')')} part. Is there a way to add an IF statement refering the the destination file.path[0]? or Something to that effect?