[
  {
    "Id": "512451",
    "ThreadId": "232290",
    "Html": "\r\n<p>Hey guys.</p>\r\n<p>I've only been coding for under 2 months now, and I'm working on a program.</p>\r\n<p>Basically it has a built in FTP uploader, so DotNetZip will put any screenshots taken, into a single .zip folder, then that .zip folder will be uploaded to the ftp server.</p>\r\n<p>However, when the screenshots are taken, they are called &quot;screenshot*randomnumber*.bmp&quot; so obviously, i cannot tell the the uploader to upload specific files as they will have different random names all the time.</p>\r\n<p>So basically I was wondering how I could make it zip the folder itself into a .zip.</p>\r\n<p>This is what I have so far:</p>\r\n<p></p>\r\n<div style=\"color:black; background-color:white\">\r\n<pre><span style=\"color:blue\">Private</span> <span style=\"color:blue\">Sub</span> btnUpload_Click(<span style=\"color:blue\">ByVal</span> sender <span style=\"color:blue\">As</span> System.Object, <span style=\"color:blue\">ByVal</span> e <span style=\"color:blue\">As</span> System.EventArgs) <span style=\"color:blue\">Handles</span> btnUpload.Click\r\n        <span style=\"color:green\">'Create Zip File</span>\r\n        <span style=\"color:blue\">Using</span> zip <span style=\"color:blue\">As</span> ZipFile = <span style=\"color:blue\">New</span> ZipFile()\r\n            zip.AddFile(<span style=\"color:#a31515\">&quot;M:\\ESP Anti-Cheat BETA v0.1\\screenshot30707.bmp&quot;</span>)\r\n            zip.Save(<span style=\"color:#a31515\">&quot;Screenshots.zip&quot;</span>)\r\n        <span style=\"color:blue\">End</span> <span style=\"color:blue\">Using</span>\r\n</pre>\r\n</div>\r\nAnd obviously here something needs to be done with the zip.AddFile to convert it to zip.AddFolder or something similar.\r\n<p></p>\r\n<p>Help?</p>\r\n<p>Thanks in advance!</p>\r\n",
    "PostedDate": "2010-10-25T16:41:37.72-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "513069",
    "ThreadId": "232290",
    "Html": "\r\n<p>Instead of calling zip.AddFile(), try calling zip.AddDirectory(), and specify the name of the directory to add into the zip file.</p>\r\n<p>There are several overloads of this method. Check the DotNetZip documentation to help you decide which of them to choose.</p>\r\n<p>&nbsp;ps: welcome to the wonderful world of computer programming!</p>\r\n",
    "PostedDate": "2010-10-26T17:12:57.627-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]