SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


File System task fails with the errror message


File System task fails with the errror message

Author
Message
PradeepVallabh
PradeepVallabh
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 526
I have an ssis package which loads excel file into Sql server...After all the processing is done i am renaming the file(with timestamp) and moving into another folder...It's failing while renaming the folder(if i just move the file without renaming it works file)

Here is the expression i am using for creating Destination variable

@[User:BigGrinestinationDirectory] +"\\"+ @[User::FileName]+"."+@[User:BigGrinateTime] +".xls"

Variable DestinationDirectory has the folder location, FileName contains original fileName,
Datetime variable has time stamp(something like 20130718122654)

Here is the error message i got (Could not find a part of the path)

If i don't specify filename and datetime i can move the file without any problem....
ManicStar
ManicStar
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3525 Visits: 3978
Casting is your friend here. Not all parts of that string you are concatting are of the same type. Make sure all elements are of the same type and using the same codepage.
PradeepVallabh
PradeepVallabh
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 526
Not sure whether it's a casting issue...I was able to evaluate the expression without any problems
PradeepVallabh
PradeepVallabh
SSC-Enthusiastic
SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)SSC-Enthusiastic (159 reputation)

Group: General Forum Members
Points: 159 Visits: 526
Silly mistake.. Forgot to change the Operation in File System Task to Rename File(It was move file before)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search