question

Joubert.Harold avatar image
Joubert.Harold asked

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?
ssissql-server-2012windows-server-2012fileszip
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joubert.Harold avatar image
Joubert.Harold answered
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.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
You should mark this as the solution then. Click on the check mark to the left of the answer.
0 Likes 0 ·
ThomasRushton avatar image
ThomasRushton answered
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".
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.