Demo entry 5040731

Check corrupted zip Files

   

Submitted by anonymous on Jun 01, 2016 at 10:24
Language: Python. Code size: 232 Bytes.

	for files in os.listdir(inFol):
		if files[-3:].lower() == "zip":
			if not zipfile.is_zipfile(inFol+files):
				corList.append(files)
				print(files)
	
	for x in os.listidr(inFol):
		if x in corList:
			os.remove(inFol+x)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).