I am working on a SSIS project that download a file via web and upload the data in sql server then after that move the downloaded file to another folder. Here is an image for a clearer picture
I have a variable:
Source_Folder
with a value:C:\Users\T-Aordiz\Documents\DumpDatas\Outbound Dump\Dump
Success_Folder
value: C:\Users\T-Aordiz\Documents\DumpDatas\Outbound Dump\Success
For Each Loop
values
Expressions:@[User::Source_Folder] , Variable Mappings: User::FileName(which is blank string)
and here is my file system task
However I encounter this error message
Error: 0xC002F304 at Success, File System Task: An error occurred with the following error message: "Could not find file 'C:\Users\T-Aordiz\Documents\DumpDatas\Outbound Dump\Dump'.". Task failed: Success
I tried changing the expression in File System Task
but also encountered an error. Help me guys
Source connection,
Option 1,
When using Foreach File Enumerator
- 'Retrieve file name', if you choose Fully Qualified, it will give you a complete path, it means @[User::Filename]
includes folder and file name with extension. you can use this variable as source connection variable.
Option 2,
When using Foreach File Enumerator
- 'Retrieve file name', if you choose 'Name and Extension', it means you must create another variable FilenameFullpath, expression specified as @[User::Source_Folder] + "\" + @[User::Filename]
. (you can always include "\" at the end of your declared folder.)
Destination connection,
You can just specify a folder, no necessary to include file name and extension.