File System task fails with the errror message

  • 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::DestinationDirectory] +"\\"+ @[User::FileName]+"."+@[User::DateTime] +".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....

  • 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.

  • Not sure whether it's a casting issue...I was able to evaluate the expression without any problems

  • Silly mistake.. Forgot to change the Operation in File System Task to Rename File(It was move file before)

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply