{"id":849,"date":"2011-12-16T02:36:10","date_gmt":"2011-12-16T02:36:10","guid":{"rendered":"http:\/\/www.webputzer.com\/?p=849"},"modified":"2011-12-16T02:55:21","modified_gmt":"2011-12-16T02:55:21","slug":"use-7z-to-zip-a-file-with-a-batch-file","status":"publish","type":"post","link":"http:\/\/www.webputzer.com\/?p=849","title":{"rendered":"Use 7-zip to zip a file with a batch file"},"content":{"rendered":"<p>7-Zip will work in conjunction with a batch file, on Windows, to zip a file automatically.  Install the program and copy 7z.exe to the system32 directory.  The syntax is this:<br \/>\n<P><br \/>\n<strong>7z a myfile.zip myfile<\/strong><br \/>\n<P><br \/>\nThat&#8217;s it, kids. Note: I don&#8217;t really understand how 7-zip is different than other zip utilities, but, the archive which it creates must be extracted by the same program.  Other programs will say that the archive is corrupt.<\/p>\n<pre>\r\n@ECHO OFF\r\ncd \"C:\\Documents and Settings\\All Users\\Application Data\\\r\nMYSQL\\MySQL Server 5.5\\data\"\r\n7z a myfile.zip myfile\r\nmove myfile.zip \"C:\\Inetpub\\wwwroot\\getit\\myfile.zip\"\r\ncd \"C:\\Inetpub\\wwwroot\\getit\"\r\nping 1.1.1.1 -n 1 -w 600000>NUL\r\ndel myfile.zip\r\n\r\nexit \r\n<\/pre>\n<p>I use something like this to create an archive which I can then download at my house via &#8220;wget&#8221; and a Linux cron job.  Bada-boom, bada-bing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>7-Zip will work in conjunction with a batch file, on Windows, to zip a file automatically. Install the program and copy 7z.exe to the system32 directory. The syntax is this: 7z a myfile.zip myfile That&#8217;s it, kids. Note: I don&#8217;t really understand how 7-zip is different than other zip utilities, but, the archive which it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-849","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=849"}],"version-history":[{"count":0,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/849\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=849"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}