SSIS - The expression cannot be parsed because it contains invalid elements at the location specified
If you get the following error when trying to write an
expression there is an easy solution
Attempt to parse the expression "@[User::FilePath] + "\" + @[User::FileName]
+ ".raw"" failed. The token "." at line number "1", character number
"<some position>" was not recognized. The expression cannot be parsed
because it contains invalid elements at the location specified.
The SSIS expression language is a C based language and the \ is a token, this
means you have to escape it with another one. i.e "\" becomes "\\", unlike C#
you can't prefix the string with a @, you have to use the escaping route.
In summary when ever you want to use \ you need to use two