![]() |
#1 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Regione Autonoma Siciliana, Italy
Posts: 48
|
![]() Hi everybody, how is it? I need help about a program
I have a folder with some .Zip files, a lot of these are damaged so I need a program who automatically check CRC of every .zip file in this folder and then automatically deleted the CRC damaged files. Winzip doesn't make that kind of work, WinRar can only tell about damaged files but not help to delete it. Please may someone help me to find a utility to make it right? |
||
![]() ![]() |
|
![]() |
#2 | ||
![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
|
![]() Thought 7Zip could do that.
http://www.7-zip.org/ Not 100% sure about the 'delete auto', never had to deal with that specific situation. But at least in 7Zip you can select all the zipfiles in a folder to check them in one action.
__________________
Not a member of The Victorious People's Shoutbox Liberation Army. Not a member of the GAG Guerrilla. Don't get A Grip! FOR RENT *Advertising space* |
||
![]() ![]() |
|
![]() |
#3 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Regione Autonoma Siciliana, Italy
Posts: 48
|
![]() <div class='quotetop'>QUOTE(dosraider @ Sep 13 2007, 09:02 PM) [snapback]310709[/snapback]</div>
Quote:
It verify all the files but doesn't allow to delete damaged zip I would like not to delete it by myself |
||
![]() ![]() |
|
![]() |
#4 | ||
![]() ![]() ![]() Join Date: Jan 2006
Location: Recklinghuasen
Posts: 1,906
|
![]() Why don't you like to delete the damaged ZIP's yourself?
Once the check is through, you would know which ones are damaged and all you have to do is to go to that folder and get rid of them... unless you're too lazy to be bothered. |
||
![]() ![]() |
|
![]() |
#5 | ||
![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Dixmuide, Belgium
Posts: 2,767
|
![]() Probably his downloaded pron pics, must be hundredthousands files.... :bleh:
__________________
Not a member of The Victorious People's Shoutbox Liberation Army. Not a member of the GAG Guerrilla. Don't get A Grip! FOR RENT *Advertising space* |
||
![]() ![]() |
|
![]() |
#6 | ||
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2004
Location: Jan Mayen, Svalbard and Jan Mayen
Posts: 2,167
|
![]() write a script that tests in the error level/return code of testing the zip file
Problem solved
__________________
Flowing with the stream of life |
||
![]() ![]() |
|
![]() |
#7 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2006
Location: Anirnar, Faroe Islands
Posts: 42
|
![]() hi Alex Cold
in addition to data's hint here's the script i use. runs only on win2k/xp (vista ?) Code:
@ECHO OFF REM Path to Commandlineversion REM download 7za from http://downloads.sourceforge.net/sevenzip/7za442.zip SET MYZIP="%ProgramFiles%\7zip\7za.exe" SET MYLOG=logfile_.txt ECHO. > %MYLOG% REM Check for ZipExe IF NOT EXIST %MYZIP% GOTO :NOEXE REM ask User for basepath or use current ECHO enter directory to scan [return for %CD%] SET /P MYROOT= IF (%1) EQU () SET MYROOT="%CD%" FOR /R %MYROOT% %%f IN (*.zip) DO CALL :SCANIT "%%f" GOTO :EOF :SCANIT ECHO Scanning %1 @CALL %MYZIP% t %1 > USELESS.$$$ SET /A ERROR=%ERRORLEVEL% REM Log and Remove all IF %ERROR% EQU 0 ECHO %1 OK >> %MYLOG% IF %ERROR% NEQ 0 ECHO %1 CORRUPT >> %MYLOG% IF %ERROR% NEQ 0 CALL :REMOVEIT %1 @DEL USELESS.$$$ GOTO :EOF REM Uncomment DEL to remove corrupt files :REMOVEIT ECHO REMOVING %1 REM DEL %1 GOTO :EOF :NOEXE ECHO No ZipProgram found GOTO :EOF |
||
![]() ![]() |
|
![]() |
#8 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Aug 2007
Location: Regione Autonoma Siciliana, Italy
Posts: 48
|
![]() <div class='quotetop'>QUOTE(So9 @ Sep 14 2007, 01:43 PM) [snapback]310893[/snapback]</div>
Quote:
Done. Thank you :brain: |
||
![]() ![]() |
|
![]() |
#9 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Feb 2006
Location: Anirnar, Faroe Islands
Posts: 42
|
![]() this is an optimized version of the script with zip and rar support
Code:
@ECHO OFF REM Init LogFile SET MYLOG=logfile_%DATE:~-10%.txt ECHO. > %MYLOG% CALL :ADDLOG "--------------------------------------------------------------" CALL :ADDLOG "Archive-Check 0.1**************************************" CALL :ADDLOG "--------------------------------------------------------------" REM Path to Commandlineversion REM download 7za from http://downloads.sourceforge.net/sevenzip/7za442.zip SET MYZIP="%ProgramFiles%\7-zip\7za.exe" SET MYRAR="%ProgramFiles%\batchfiles\rar.exe" REM Check for ZipExe IF NOT EXIST %MYZIP% GOTO :NOEXE %MYZIP% IF NOT EXIST %MYRAR% GOTO :NOEXE %MYRAR% REM ask User for basepath or use current ECHO enter directory to scan [return for %CD%] SET MYROOT= SET /P MYROOT= IF (%MYROOT%) EQU () SET MYROOT="%CD%" REM Ask for Scanmode (Fast=Open and List Contents/Deep=CRC) ECHO Scanmode (F)ast or (D)eep [Deep] SET /P SCANMODE= IF /I (%SCANMODE%) EQU (f) (SET SCANMODE=Fast) ELSE (SET SCANMODE=Deep) REM Set ScanSwitches IF /I (%SCANMODE%) EQU (Deep) ( SET SWZIP=t SET SWRAR=t ) ELSE ( SET SWZIP=l SET SWRAR=l ) REM Add Command-Switch SET MYZIP=%MYZIP% %SWZIP% SET MYRAR=%MYRAR% %SWRAR% REM Here we go CALL :ADDLOG "--------------------------------------------------------------" CALL :ADDLOG "RootDir : %MYROOT%" CALL :ADDLOG "Mode****: %SCANMODE%" CALL :ADDLOG "RAREXE**: %MYRAR%" CALL :ADDLOG "ZIPEXE**: %MYZIP%" CALL :ADDLOG "--------------------------------------------------------------" CALL :ADDLOG "Started : %TIME% / %DATE%" REM SCAN ALL ZIP FILES FOR /R %MYROOT% %%f IN (*.rar) DO CALL :SCANRAR "%%f" FOR /R %MYROOT% %%f IN (*.zip) DO CALL :SCANZIP "%%f" CALL :ADDLOG "Stopped : %TIME% / %DATE%" IF EXIST USELESS.$$$ DEL USELESS.$$$ GOTO :EOF REM #################################################################### REM # Scan Archives REM #################################################################### :SCANZIP @CALL %MYZIP% %1 > USELESS.$$$ SET /A ERROR=%ERRORLEVEL% REM Log and Remove IF %ERROR% EQU 0 CALL :ADDLOG "%1 OK" IF %ERROR% NEQ 0 CALL :REMOVEIT %1 GOTO :EOF :SCANRAR @CALL %MYRAR% %1 > USELESS.$$$ SET /A ERROR=%ERRORLEVEL% REM Log and Remove IF %ERROR% EQU 0 CALL :ADDLOG "%1 OK" IF %ERROR% NEQ 0 CALL :REMOVEIT %1 GOTO :EOF REM #################################################################### REM #Subfunktions REM #################################################################### :REMOVEIT REM Uncomment DEL to remove corrupt files CALL :ADDLOG "%1 CORRUPT" REM DEL %1 GOTO :EOF :NOEXE ECHO %1 not found GOTO :EOF :ADDLOG SET LOGOUT=%1 SET LOGOUT=%LOGOUT:"=% ECHO %LOGOUT% ECHO %LOGOUT% >> %MYLOG% GOTO :EOF |
||
![]() ![]() |
|
![]() |
#10 | ||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Oct 2004
Location: Iisalmi, Finland
Posts: 416
|
![]() Where do I put this script?
|
||
![]() ![]() |
|
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
.ISO file | sgtboat | Troubleshooting | 3 | 15-10-2008 10:15 AM |
Need Help With Jar File | Ioncannon | Programming | 4 | 22-03-2007 05:25 AM |
Where Is The Exe. File. | oyjah | Troubleshooting | 2 | 18-06-2006 10:54 PM |
Bin But No Cue File? | Guest_matt | Troubleshooting | 8 | 09-08-2005 08:05 PM |
Pif File | Guest | Troubleshooting | 8 | 28-04-2005 09:08 PM |
|
|
||
  |