Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We want to 7zip many database files (mysql, Oracle, and SQL Server dumps), various standard files (excel, word, etc), but we are afraid that once we 7Zip them and delete the originals it can happen that archive is corrupted or it has some error and the files will be lost.

Is there a way that once you 7zip something you can check and verify that you can unzip the file later on? We would 7Zip the file, check if archive is OK, and then delete the original file. It would be nice that this can be achieved through command line as we would automate it.

We use Windows Servers 2003, 2008 and 2008 R2.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You can use 7zip to do this. Either right click and select Test Archive from the 7-Zip context menu or you can use the command line

7z t somearchive.7z 
7z t somearchive.zip

etc

You get output like this from the command line

"c:\program files\7-zip\7z" t somefile.7z

7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: douglas.cx.txt.7z

Testing     somefile.txt

Everything is Ok

Size:       761
Compressed: 492
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.