Creating folder structure from first letter in movie/tv
Posted: 14 Apr 2014, 19:12
I have been using the following code in the GUI to Create folder structure from first letter in movie/tv
remove the word 'The' and trailing space
get the first character
if it is a letter use it
else - put it in a folder '0-9'
the script has been working fine for the most part except every once and a while it wants to create a '1' or a '4' folder etc...
it seems to happen if there is a 'The ' striped away.

I would also like to know where i can get some documentation on the commands/syntax available for the GUI as i have been guessing at the code and don't really know the parameters for the commands.
thanx in advance.
Code: Select all
t:\new\TV\{n =~ /^(?i)[a-z]/ ? n.replaceFirst(/^(?i)(The|A)\s(.+)/, /$2, $1/).getAt(0) : '0-9'}\{n.replaceAll(/[(]/,"[").replaceAll(/[)]/,"]")}\Season {s}\{n.replaceAll(/[(]/,"[").replaceAll(/[)]/,"]")} - {s00e00} - {t.replaceAll(/[(]/,"[").replaceAll(/[)]/,"]")}
get the first character
if it is a letter use it
else - put it in a folder '0-9'
the script has been working fine for the most part except every once and a while it wants to create a '1' or a '4' folder etc...
it seems to happen if there is a 'The ' striped away.

I would also like to know where i can get some documentation on the commands/syntax available for the GUI as i have been guessing at the code and don't really know the parameters for the commands.
