<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KentW Limited &#187; WIN</title>
	<atom:link href="http://ltd.kentw.co.uk/tag/win/feed/" rel="self" type="application/rss+xml" />
	<link>http://ltd.kentw.co.uk</link>
	<description>Appsblog 2.1</description>
	<lastBuildDate>Mon, 07 Jun 2010 19:55:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ziptest</title>
		<link>http://ltd.kentw.co.uk/technical/ziptest/</link>
		<comments>http://ltd.kentw.co.uk/technical/ziptest/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 11:36:01 +0000</pubDate>
		<dc:creator>Kent</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Oracle Enterprise Linux]]></category>
		<category><![CDATA[WIN]]></category>

		<guid isPermaLink="false">http://ltd.kentw.co.uk/technical/ziptest/</guid>
		<description><![CDATA[This is a couple of useful scripts to test downloaded files.
This approach is recommended when downloading huge amounts of data like when downloading Oracle R12 installations files.
In addition to testing the downloaded files also be sure to use a download manager.
The basic zip test command is:
$ unzip –t –qq {zipfile}
I made a Linux script for [...]]]></description>
			<content:encoded><![CDATA[<p>This is a couple of useful scripts to test downloaded files.</p>
<p>This approach is recommended when downloading huge amounts of data like when downloading Oracle R12 installations files.</p>
<p>In addition to testing the downloaded files also be sure to use a download manager.</p>
<p>The basic zip test command is:</p>
<p>$ unzip –t –qq {zipfile}</p>
<p>I made a Linux script for it named ziptest.sh:</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><font size="2" face="Courier New">#!/bin/bash            <br /># ziptest.sh             <br />SOURCE=/util/install/R12.1.1-32             <br />if [ -z &quot;$1&quot; ]             <br />then             <br />&#160;&#160;&#160; name=&quot;*.zip&quot;             <br />else             <br />&#160;&#160;&#160; name=&quot;$1.zip&quot;             <br />fi             <br />for zipfile in $SOURCE/$name             <br />do             <br />&#160;&#160;&#160; unzip -t -qq $zipfile             <br />&#160;&#160;&#160; if [ $? -eq 0 ]             <br />&#160;&#160;&#160; then             <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo -n &quot;.&quot;             <br />&#160;&#160;&#160; else             <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &quot; &quot;             <br />&#160;&#160;&#160; fi             <br />done             <br />echo &quot; &quot;</font></td>
</tr>
</tbody>
</table>
<p>A similar script can be made for Windows names ziptest.cmd:</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><font size="2" face="Courier New">@echo off            <br />rem ziptest.cmd {zipfilename}             <br />set zipdir=..\R12.1.1-32             <br />rem do all zip files unless arg received             <br />set zipfile=*.zip             <br />if [%1]==[] goto doit             <br />&#160;&#160; set zipfile=%1.zip             <br />:doit             <br />&#160;&#160; set target=%zipdir%\%zipfile%             <br />&#160;&#160; for %%a in ( %target% ) do call ziptest_call %%a</font></td>
</tr>
</tbody>
</table>
<p>As command line programming in windows isn’t great we need to call a subprogram names ziptest_call:</p>
<table border="1" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="400"><font size="2" face="Courier New">@echo off            <br />rem ziptest_call.cmd {zipfile}             <br />if [%1]==[] goto noarg             <br />if not exist %1 goto nofile             <br />:main             <br />&#160;&#160;&#160; unzip –t –qq %1             <br />&#160;&#160;&#160; if errorlevel 1 goto badfile             <br />goto xit             <br />:noarg             <br />&#160;&#160;&#160; echo ARG missing – use only with ziptest.cmd             <br />goto xit             <br />:nofile             <br />&#160;&#160;&#160; echo FILE %1 does not exist             <br />goto xit             <br />:badfile             <br />&#160;&#160;&#160; echo %1 BAD             <br />goto xit             <br />:xit</font></td>
</tr>
</tbody>
</table>
<p>That should be it.</p>
<p>Be sure to update directory references for your own purpose.</p>
]]></content:encoded>
			<wfw:commentRss>http://ltd.kentw.co.uk/technical/ziptest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
