I have a task that should rename a file
I have a variable called RenameFileName
\\servername\csv\BACKUP_" + (DT_WSTR,4)DATEPART("yyyy",GetDate()) + RIGHT("0" + (DT_WSTR,2)DATEPART("mm",GetDate()) ,2) + RIGHT("0" + (DT_WSTR,2)DATEPART("dd",GetDate()),2) + ".csv
When I run the task I get the error
Illegal characters in path
Am I doing anything wrong? I have tried escaping backslashes, and putting it quotes. If I remove the parts with brackets and pluses, it works fine.
Thanks
As I mentioned, you need to escape the backslashes (
\). Also, you're missing a opening and closing double quote ("):