I'm using a foreach loop and file system task to move files into specific folders (or trying to at least).
i.e.
A file name can be 100000 and it needs to go to folder 1000 File 102000 needs to go to folder 1020 File 103000 need to go to folder 1030 etc etc
I'm struggling with how to move the files to the correct folder.
I thought I could use a variable with the upper level directory followed by a substring of the filename variable held in the foreach loop
e.g.
"D:\\Archive\\" + SUBSTRING(@[USER::Variable],1,4)
But that doesn't work and I get an error that the path format is not supported.
Any help is greatly appreciated, thanks.


informedbadgeSUBSTRING((DT_WSTR, 6) @[USER::Variable,1,4)File System TaskorScript Taskor something else?