Carry2018-06-12 11:14:58
Carry, 2018-06-12 11:14:58

7zip how not to decompress corrupted file via command line?

Tell me how not to unpack damaged archives. Can't find similar keys that are responsible for this.
The only thing I found is the key (t - Tests the integrity of the files in the archive).
Or, as an option, delete these files along with the archive.
Windows 2008 R2 system

@echo off

set "SourceFolder=C:\OpenServer\domains\upload\test"
set "TargetFolder=C:\OpenServer\domains\upload\test"
if not exist "%TargetFolder%" md "%TargetFolder%"
pushd "%TargetFolder%" || goto:eof
for /f "tokens=*" %%i in ('dir /b /s /a *.zip *.rar *.7z') do (
"C:\Program Files\7-Zip\7z.exe" x "%%i" -aou -o* && del /f /q "%%i"
  echo "%%i"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question