I posted my final template in the other thread, but to make it easier to find with a forum search, I'm posting it here as well:
Code:
program:
switch(current_library_name(),
'Calibre Library',
template('{#division}/{#genre}/{#authorlookup}/{series:||/}{series_index:0>3s||_}{#subseries}{#subseries_index:0>3s||_}{title}'),
'Library - Special',
template('{#group}/{title}'),
'Library - Working',
template('{author_sort}/{series}/{series_index:0>3s}_{title}'),
template('{author_sort}/{series}/{series_index:0>3s}_{title}'))