April 20, 2006 at 10:35 am
I have a file system task that copys an excel spreadhseet and renames it to a different file name. Sounds real simple. In my task I have defined an expression for 'Destination' that creates a string with the path and name of the new file.
"\\" + "\\2-228-7\\amrshared\\dailyexport\\SNIEDailyProduction_"+(DT_WSTR,2)DATEPART("month",GETDATE()) + (DT_WSTR,4)DATEPART("day",GETDATE()) + (DT_WSTR,4)DATEPART("year",GETDATE()) + ".xls"
When I attempt to run this task I get the following error messages. I am sure I am doing something simple wrong.
Thanks in advance.
Error at Package: The connection "\\2-228-7\amrshared\dailyexport\SNIEDailyProduction_4202006.xls" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error at File System Task: Failed to lock variable "\\2-228-7\amrshared\dailyexport\SNIEDailyProduction_4202006.xls" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Error at File System Task [File System Task]: An error occurred with the following error message: "Failed to lock variable "\\2-228-7\amrshared\dailyexport\SNIEDailyProduction_4202006.xls" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
".
April 21, 2006 at 8:29 am
Please disregard. Problem solved.
To resolve this problem I changed the variable Read Only setting to 'true'
Cheers
October 9, 2007 at 10:45 am
Can you elaborate on this? I don't understand what you did.
February 25, 2008 at 8:05 am
Hi,
How did you solve this problem
actually i have also the same problem
can anyone please tell me how to create a File System Task VAriable i want to rename a file, and where to assign the path in Expression Builder.
iam getting the Error " Falied to lock the Variable" ..
Please Advice.
July 25, 2008 at 3:45 pm
Were you able to figure out what the problem is. I'm receiving the same error and my variable is a read only in the script task.
Error: 0xC0014054 at Script Task: Failed to lock variable "@User::FileName" for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Error: 0x5 at Script Task: The script files failed to load.
Thanks!
Wendy Schuman
August 27, 2008 at 3:14 pm
I have gotten it to work on my side, I was using an FTP Task to delete files on the FTP Server,
my IsRemotePathVariable was set to true, I have now set it to false, and its working,
my FTP Connection Manager, FileNames and Remote Directory is dynamic using variables, so the values keeps on changing during run time
November 9, 2009 at 5:58 am
Hi
I had the same problem.
I am downloading the files the remote ftp server
The file path for today ex:/m/09112009/a.txt
Likewise i need to download daily. I have configured an variable following way
@[User::Rpat]="/m/"+"0"+((DT_STR,2,1252) DATEPART("DD",GETDATE())) +
((DT_STR,2,1252) DATEPART("MM",GETDATE())) +
((DT_STR,4,1252) DATEPART("YY",GETDATE())) +
"/*.text"())
But i am getting error
"Failed to lock variable for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Any help?
June 11, 2010 at 9:57 am
I ran into a similar problem and it seems to have to with the fact that I was using expressions to set my destination and source variables (it's funny because it works fine for file copy, but not for move directory). In my expressions I am concatenating two variables together to create the full path, so instead I created a variable to hold the full path, then placed a script task before the move and concatenated the variables there. I deleted the expressions from the file system task and just referenced the full path variable name i.e. User::varFullFilePath. This seems to work for me.
March 4, 2011 at 12:43 pm
I had to add a script task also. I was trying to delete a folder made up of names of two variables that are populated earlier in the package. I tried using an expression in the file system task but got the error reported here. Added a script task to contactenate the two variable to a new variable. Used the new variable in the file system task and it all worked.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply