#!/bin/bash
# Searches through the dir from which called and moves any
# suspected bad zips to the new dir Bad_zips. Won't work with
# archives spread over several files.
#


mkdir Bad_zips
for i in `ls *.zip`
do
	export b=`unzip -t $i |grep "signature not found"| wc -l`
	if [ $b -ne 0 ] ;then
		mv $i Bad_zips/
		export b=0
	fi
done
