It took some time for me to figure this one out, but actually it’s pretty easy…
Apparently the SSIS coding is based on C/C#, so you’ll need to use an escape character to get the filename out of ‘Fully qualified’ path/filename.
So to get ‘FileName.txt’ out of ‘C:\Temp\FileName.txt’, you’ll need to use a combination of FINDSTRING() and REVERSE():
FINSTRING() – To find a string-part within a string
REVERSE() – Because you’re not able to select the last string-part within a string.
SUBSTRING(REVERSE(@[User::FileName]),1,FINDSTRING(REVERSE(@[User::FileName]),"\\",1) - 1)