[
  {
    "Id": "1013202",
    "ThreadId": "436130",
    "Html": "0\r<br />\ndown vote\r<br />\nfavorite\r<br />\nI have to created a folder in the amazon S3. Now have to convert that folder in the zip file. I have used the DotNetZip Liberary to convert to the .zip file. \r<br />\n<br />\n  public void ConvertToZip(string directoryToZip, string zipFileName)<br />\n<pre><code>{\n    try\n    {\n\n        using (client = DisposableAmazonClient())\n        {\n            var sourDir = new S3DirectoryInfo(client, bucket, directoryToZip);\n\n            var destDir = new S3DirectoryInfo(client, bucket, CCUrlHelper.BackupRootFolderPhysicalPath);\n\n            using (var zip = new ZipFile())\n            {\n                zip.AddDirectory(sourDir.FullName); // recurses subdirectories\n                zip.Save(Path.Combine(destDir.FullName, zipFileName));\n            }\n        }\n\n        logger.Fatal(&quot;Successfully converted to Zip.&quot;);\n    }\n    catch (Exception ex)\n    {\n        logger.Error(&quot;Error while converting to zip. Error : &quot; + ex.Message);\n    }\n}\n\n</code></pre>\n\nWhen I run the code it is showing the error &quot;The given path's format is not supported.&quot;<br />\n",
    "PostedDate": "2013-03-11T05:05:46.63-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]