[
  {
    "Id": "918711",
    "ThreadId": "397232",
    "Html": "\r\n<p>I have been trying to add arguments to my command line in a batch file. I have tried adding the selector &quot;*.txt&quot;as shown in documentation examples:</p>\r\n<p>&nbsp; From the included help file in the executable:<br>\r\n<br>\r\n&nbsp;&nbsp;&nbsp; zip [-shortopts ...] [--longopt ...] [zipfile [path path ...]] [-xi list]</p>\r\n<p>&nbsp;&nbsp;&nbsp; No Example included</p>\r\n<p>&nbsp; From DotNetZip Command-Line Tools HTML file:</p>\r\n<p>&nbsp;&nbsp;&nbsp; ZipIt.exe &lt;ZipFileToCreate&gt; [arguments]</p>\r\n<p>&nbsp;&nbsp;&nbsp; Example:&nbsp;</p>\r\n<table border=\"1\">\r\n<tbody>\r\n<tr>\r\n<td colspan=\"2\">zipit.exe Backup.zip -d c:\\MyDocuments -r&#43; -j- *.*</td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td>create a new zip file called Backup.zip, adding all files within the c:\\MyDocuments directory. Do not traverse NTFS Junction points (like My Videos).</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>*****************************************************************************</p>\r\n<p><span style=\"color:#0000ff\"><span style=\"color:#000000\">C:\\Tools\\ZipIt.exe</span>\r\n<span style=\"color:#008080\">E:\\EP3-PC\\2012-27-09\\Backup.zip </span></span><span style=\"color:#008080\"><span style=\"color:#ff0000\"><span style=\"color:#0000ff\">C:\\Source</span> -r&#43; &quot;name = *.txt&quot;</span></span></p>\r\n<p><span style=\"color:#000000\">&nbsp;Command &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\r\n<span style=\"color:#008080\">ZipFile &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;\r\n<span style=\"color:#0000ff\">Source Folder &nbsp; &nbsp; <span style=\"color:#ff0000\">\r\nSelector</span></span></span><br>\r\n</span></p>\r\n<p><span style=\"color:#ff0000\"><span style=\"color:#000000\">*****************************************************************************</span><br>\r\n</span></p>\r\n<p>Exception: System.IO.FileNotFoundException: That file or directory (<span style=\"color:#ff0000\">-r&#43;\\-name</span>) does n<br>\r\not exist!<br>\r\n&nbsp;&nbsp; at Ionic.Zip.ZipFile.UpdateItem(String itemName, String directoryPathInArchiv<br>\r\ne)<br>\r\n&nbsp;&nbsp; at Ionic.Zip.Examples.ZipIt.Main(String[] args)</p>\r\n<p>*****************************************************************************</p>\r\n<p>I've placed this selector without the &quot;noun&quot; and &quot;operator&quot; (which is shown as acceptable) both before and after the Source Folder (and in every other combination for that matter). I've tried using single and double quotes around each argument - still no\r\n dice :-(</p>\r\n<p>In every instance I get the FileNotFoundException. If I remove the selector options</p>\r\n<p><span style=\"color:#0000ff\"><span style=\"color:#000000\">&nbsp;&nbsp;&nbsp;&nbsp; C:\\Tools\\ZipIt.exe</span>\r\n<span style=\"color:#008080\">E:\\EP3-PC\\2012-27-09\\Backup.zip </span></span><span style=\"color:#008080\"><span style=\"color:#ff0000\"><span style=\"color:#0000ff\">C:\\Source</span></span></span></p>\r\n<p><span style=\"color:#008080\"><span style=\"color:#ff0000\"><span style=\"color:#0000ff\"><span style=\"color:#000000\">it runs exactly as expected.</span><br>\r\n</span></span></span></p>\r\n<p>Can someone please fashion a working command line that will illuminate me on the proper syntax?</p>\r\n<p>Thanks in advance for your help!</p>\r\n",
    "PostedDate": "2012-09-27T13:45:39.113-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "918808",
    "ThreadId": "397232",
    "Html": "<p>I ended up trying to use ANY arguments, but none worked... This evening I d/l'd the source code for ionic.zip.dll and zipit.exe. I recompiled everything, but I ended up with the same results...</p>\r\n<p>Any help would be appreciated - my ability to use this executable in a batch file is critical.</p>",
    "PostedDate": "2012-09-27T20:12:38.28-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "926063",
    "ThreadId": "397232",
    "Html": "\r\n<p>OK - Still working on this...</p>\r\n<p>I can get the parameters to work if I add them to the Command Line arguments in Visual Studio while using the ZipIt source code. I can use the following arguments and all works as designed:</p>\r\n<p>E:\\XXX-PC\\SecurityAudits\\2012-03-10\\2012-10-10_9-42-48.zip -s Log.txt&nbsp; &quot;Backed up on Wed 10/010/2012 at&nbsp; 9:42:51.04&quot; -D C:\\VS\\ArchivedLogs -r&#43; -E ctime&gt;2012-10-02-07:53:00</p>\r\n<p>I need to be able to pass in&nbsp;timestamp values to the variables that I'll use to backup and compress only files newer than the last backup. For now, I'm just trying to pass in the current timestamp.</p>\r\n<p>Here is what I'm trying to do:</p>\r\n<pre>*********************************************************************************</pre>\r\n<pre><span style=\"color:#0000ff\">@echo off\r\n@setlocal\r\necho The date is %DATE%\r\nset tagdate=%DATE:~-4%-%DATE:~7,2%-%DATE:~4,2%\r\necho %tagdate%\r\nset backupfolder=C:\\DATA\r\nset destinationfolder=E:\\%computername%\\ProgData\\%tagdate%\r\nmkdir %destinationfolder%\r\necho backing up this folder:  %backupfolder%\r\nset zipit=C:\\Test\\Tools\\ZipIt.exe\r\nset unzip=C:\\Test\\Tools\\UnZip.exe\r\nset tagtime=%time:~0,2%:%time:~3,2%:%time:~6,2%\r\necho tagtime=%time:~0,2%:%time:~3,2%:%time:~6,2%\r\necho %tagtime%</span></pre>\r\n<pre><span style=\"color:#ff0000\">REM Everything works up to here</span></pre>\r\n<pre><span style=\"color:#ff0000\">REM This strips any inline spaces </span></pre>\r\n<pre><span style=\"color:#0000ff\">set tagtime=%tagtime: =%</span></pre>\r\n<pre><span style=\"color:#0000ff\">echo %tagtime%\r\nset filetime=%time:~0,2%-%time:~3,2%-%time:~6,2%\r\necho %filetime%\r\nset filetime=%filetime: =%\r\necho %filetime%\r\nset zipfile=%destinationfolder%\\%tagdate%_%filetime%.zip\r\necho %zipfile%\r\n</span><span style=\"color:#ff0000\">REM Again - all of the variables are being created correctly and are recalled correctly by ECHO</span></pre>\r\n<pre><span style=\"color:#0000ff\">set selectors=-r&#43; -E mtime&gt;%tagdate%-%tagtime% </span></pre>\r\n<pre><span style=\"color:#0000ff\">echo %selectors% </span></pre>\r\n<pre><span style=\"color:#0000ff\">&quot;%zipit%&quot; %zipfile% %backupfolder% %selectors% </span></pre>\r\n<pre><span style=\"color:#ff0000\">REM The selector variable gets passed without the %tagdate% variable, and subsequently errors out</span></pre>\r\n<pre>*********************************************************************************</pre>\r\n<pre>I have tried every concieveable combination of setting the variables %tagdate% and %tagtime% to match what the documentation calls for</pre>\r\n<pre>and what actually works in Visual Studio, but can't seem to get the variables to pass through to the command line for proper execution.</pre>\r\n<pre>Can anyone provide some assistance to get this working - I'm rapidly approaching my deadline, and I'm committed to ZipIt to get this done...</pre>\r\n<pre>Thanks in advance,</pre>\r\n<pre>Eric</pre>\r\n",
    "PostedDate": "2012-10-12T19:49:24.673-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]