[
  {
    "Id": "897716",
    "ThreadId": "390917",
    "Html": "\r\n<p>I have DotNetZip installed and running fine on a Windows 2008 server.</p>\r\n<p>Using a classic ASP page, I want to bundle a bunch of comma-delimited files to a user and send it over in a zip file.</p>\r\n<p>The following code works fine but it stores all the path information so the files inside the zip file are located in some ridiculous directory like\r\n<code>C:\\Inetpub\\wwwroot\\appname\\_temp\\</code></p>\r\n<p>I'm using the following code:</p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre>Set objZip = CreateObject(&quot;Ionic.Zip.ZipFile&quot;) \r\nsFileArray = Split(sFileArray, &quot;|&quot;) \r\nFor iCount = 0 To UBound(sFileArray) \r\n     If sFileArray(iCount) &lt;&gt; &quot;&quot; Then \r\n          objZip.AddFile sFileArray(iCount) \r\n     End If \r\nNext \r\nobjZip.Name = sFilePath &amp; &quot;test.zip&quot; \r\nobjZip.Save() \r\nobjZip.Dispose() \r\nSet objZip = Nothing \r\n</pre>\r\n</div>\r\n<p>I&nbsp;see that the&nbsp;AddFile&nbsp;method allows you to specify where you want the added file to reside in the zip file if you add a second parameter. According to the documentation objZip.AddFile sFileArray(iCount), &quot;&quot; should put the file in the root\r\n of the zip file.</p>\r\n<p>However, when I add that parameter, I get the following error:</p>\r\n<p>Wrong number of arguments or invalid property assignment: 'objZip.AddFile'</p>\r\n<p>Anyone have any idea what I'm doing wrong?</p>\r\n<p>Thanks.</p>\r\n",
    "PostedDate": "2012-08-09T11:45:19.257-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "898023",
    "ThreadId": "390917",
    "Html": "<p>Try to add \"/\" for the second parameter instead of just an empty string.</p>",
    "PostedDate": "2012-08-10T05:50:38.87-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "898026",
    "ThreadId": "390917",
    "Html": "<p>Yeah, that doesn't work either.</p>\r\n<p>The error indicates that a second parameter isn't even valid for the .AddFile method.</p>\r\n<p>The work-around I found was to call .AddFile_2 buried in the documentation or a bug report (I forget) here.</p>\r\n<p>.AddFile_2 accepts the second parameter and passing it \"\" puts the files in the root.</p>",
    "PostedDate": "2012-08-10T05:55:32.877-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]