I have built a package using a foreach loop
container and within that a File System Task
. This is supposed to move and rename multiple files.
I'm using several variables of source and destination; and file name. It seems that variables are defined fine. All pointing to a V-drive.
When trying to run the package, it gives an error:
"[File System Task] Error: An error occurred with the following error message: "Could not find file 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\destination_Filename.pdfFilename.pdf'."
I cannot figure out why is it actually trying to get into C-drive\program files, while I've defined clearly and completely different paths for both source and destination.
Anyone can help please?
The error states that your expression is not getting evaluated. Best way to debug is, in your for-each loop, put a Script task
(C#), Pass on the variables and print it. Script to print:
public void Main()
{
string strMessage = Dts.Variables["User::test"].Value.ToString();
MessageBox.Show(strMessage);
Dts.TaskResult = (int)ScriptResults.Success;
}
This won't immediately solve your issue, but will give you a checkpoint if problem persist after variable load or before.