SSIS 2012 For Each File treats .zip file as a folder
I have an SSIS Package which i passed a parameter containing a FolderName. I log the start of the Folder Processing to a SQL table, Then do a For Each Loop on the files in the folder including the subfolders. The loop includes logging the filename to a table. It would appear that a .Zip file is treated as a folder, the OS on the server is Windows Server 2012 Standard (64-Bit) using SQL Server 2012 11.0.3349 (64-Bit). This only happens when running the deployed package as a Sql Server Agent Job. using a Service account on the stand-alone server. This account has full rights to the file store in question. When the package is run in VS 2012 it behaves normally. Anyone come across this problem?
OK - I got it solved. I right-clicked on a zip File and clicked on Properties. Changed the Type of File from Compressed folder to Zip File, by allocating it to 7-Zip. This did not resolve the problem. After putting further logging into my Script Task, I determined that the delay was in the script task, not on treating the zip files as folders. I eventually applied SQLServer2012_SP1_CU5 taking the SQL Server to build 11.0.3373. Thereafter the script task within the ForEach File loop performed as expected.
When you run the package in VS2012, are you running it on the Windows2012 server, or on your workstation (running some other version of Windows)? I suspect it's a OS "feature" on Windows Server 2012 - Windows seeing a ZIP file and, as you describe, treating it like an ordinary directory/folder, "because it can".