How to delete a flat file after its mailed

  • I created an SSIS package that exports a query result to a flat file with a Data Flow task, mails the file as an attachment with a Send Mail task, then deletes the flat file with a File System task. Worked fine when I developed the package, but after deleting the flat file, the SMTP Connection Manager now has the red X and error message that the file is missing. Now I can't run it again. I tried changing the Precedence Constraint from Success to Completion. The error is in Validation, message is that the file is missing. The file would be there if the package would let the Data Flow task run. This was a pretty simple package in DTS. There I deleted the file using xp_cmdshell after it was mailed. How can I get past the Validation error?

  • On the Send Mail Task set the DelayValidation property to True, the default is False.

  • Success! Thank you very much!

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

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