6

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.

I don't know.
  • 275
  • 3
  • 6
  • 17

1 Answers1

9

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
user9517
  • 114,104
  • 20
  • 206
  • 289