I created an SSIS package that extracts two files from a .zip file, imports data from them and then attempts to delete the files that were extracted.
The package works, data is imported and all tasks report success. However the File System Tasks that attempt to delete the files don't delete them, even though they report success. I use the CozyRoc Zip Task to extract the files. When I remove the Zip Task, the File System Tasks actually do delete the files. I'm not certain that CozyRoc is causing the problem, but the existence of that task may be causing other issues with the package.
- Can anyone help me figure out how to reliably delete the files?
- Do I need to put in some sort of pause after the Data Flow Tasks to allow them to release whatever locks they might have on the files?
- Is there a way to view the DOS commands that the File System tasks use at run time, to verify that they are actually attempting to delete the correct files?
Thank You, Robbie
Control Flow:
Details:
- Visual Studio 2019 v16.11.3
- File Names are from Flat File Connection Managers (See image below).
- Flat File Connection Managers use Expressions to set their connection strings.
- The same connection managers are used to import the data, so I presume that they accurately refer to the correct files and their correct locations.
File System Task Editor for one of the delete tasks: