File System Task failing

  • Hi, I created an SSIS package. It has two File system task. First file system task copy and renames a file. Then comes a script task which zips the file and then another script task which emails the file and finally the second file system task that deletes the zipped file. My problem is, when I run the package, the package errs out at the second file system task with error:

    [File System Task] Error: An error occurred with the following error message: "The process cannot access the file 'C:\VLD\VLD_ACHV\AGG_VLD_20090109_102639.xls.zip' because it is being used by another process.".

    When I disable the Script task to send mail(named Send Mail), the second file system task (named Delete Zip File) works fine. However, when Send Mail script task is enabled, Delete Zip File task fails. I am using input/output variables.

    Any suggestions on this issue would be highly appreciated. Thanks in advance.

    --Bhaktapur

  • Sounds like the e-mail process hasn't finished with it before the delete process fires up. You may need to make that asynchronous, and have a status-check step before the delete runs.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I think it was Jack Corbett who suggested this in another thread (I may have the wrong name) but you may want to look at the File Properties Task offered by pragmaticworks.com.

  • Thank you everyone for your support.

    I solved the problem using a different variable to save the name into and use that variable in second File System task to delete the file. It worked fine. Again I would like to appreciate your help.

    Bhaktapur

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

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