Hi Daver555,
I tried this with a file trigger, but you can change the file trigger variable with the right variable in your case.
So:
My last file trigger is:
{TRIGGER(Active|LastTrigger|File.Result.Name)} =
R48 - Supplier Portfolio - 2014-03-07.pdf
Than you can strip the last 14 characters to get the last part:
{
STRING(Right|{TRIGGER(Active|LastTrigger|File.Result.Name)}|
14)} =
2014-03-07.pdfUsing this variable, it's easy to get the year and the month by using the substring method:
{
STRING(Substring|{STRING(Right|{TRIGGER(Active|LastTrigger|File.Result.Name)}|14)}|
0|4)} =
2014{
STRING(Substring|{STRING(Right|{TRIGGER(Active|LastTrigger|File.Result.Name)}|14)}|
5|2)} =
03So now you can use the file copy task and move the file to the right folder. Use the last two varaibles to create the right directories:
Portfolio\{STRING(Substring|{STRING(Right|{TRIGGER(Active|LastTrigger|File.Result.Name)}|14)}|0|4)}\{STRING(Substring|{STRING(Right|{TRIGGER(Active|LastTrigger|File.Result.Name)}|14)}|5|2)}
Regards
Erik
Uses Visualcron since 2006.