March 22, 2010 at 2:19 pm
I used File System Task, the operation rename, and then use en the variable of FullDestinationPathFileName: "@[User::ArchivePath] + (DT_STR, 30, 1252) (@[User::counter]) + SUBSTRING( @[User::MyFileValue] , FINDSTRING( @[User::MyFileValue],".",1) , LEN( @[User::MyFileValue] ) ) ". And Iยดm using other variable (@[User::counter]), and the expressions of variable Iยดm trying to add one: (@[User::counter])=(@[User::counter]+1, because I want to rename each destinations files rename like: 1.xls, 2.xls, 3.xls, like sequential way, but I have an error ๐
Please any help.
How Can I rename the several files that have been to copy a destination files, and put one by one with sequential numbers?
Really I appreciated.
March 22, 2010 at 2:22 pm
March 22, 2010 at 2:57 pm
Hello,
The error is: "Expression cannot be evaluated"
Additional Information:
-> Reading the variable "User::counter" failed with error code 0XX001F188.
(Microsoft.DataTransformationServices.Controls)
Thank U by Your help ๐
March 22, 2010 at 3:10 pm
Make sure you type cast your counter variable as string....otherwise, you cannot include it in your string variable.
March 22, 2010 at 3:11 pm
Expressions allow you to use variables, but not to assign their values.
March 22, 2010 at 3:15 pm
Phil Parkin (3/22/2010)
Expressions allow you to use variables, but not to assign their values.
Yep, Phil's correct. I did not see the assignment. You'll need to increment your variable somewhere else in the loop container. Then you can use the variable to build out your string for the file name. When you do this, make sure you type cast the counter variable to string.
March 22, 2010 at 3:28 pm
Thank U again,
Please, Im new in this, someone idea how can I to get one variable that it goes to increment with a for each loop conatiner, each time that to copy one by one the files? And then can I to include this variable in the complete string of the FullArchivePathFileName.
In this string I write with this cast: (DT_STR, 30, 1252) (@[User::counter]) Is It right?
I apreciated Your Help ๐
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply