>>>>Hi,
>>>>
>>>>How can I to identify if ZIP file is corrupted, through VFP?
>>>>Thanks in Advance!
>>>
>>>
>>>I have done this a few ways. The most straight-forward is to use a utility like 7za.exe (a stand-alone version of 7-zip) to test the archive and parse the output looking for its error message.
>>
>>Rick,
>>
>>Thanks!
>>Is there some trick to do this with PKZ.exe utility?
>
>
>No trick. But PKUNZIP won't work on 64-bit computers. To get the archive utility's output, just pipe the result using (the greater than sign) to a file which you can parse afterward:
>
>
! PKUNZIP -t myfile.zip > output.txt
>! 7za t myfile.zip > output.txt
>
>Then use:
>
lcResult = FILETOSTR("output.txt")
>afterward, and look for the error notification. You can find an error by creating a false archive and testing it.
Rick,
I tested with a old "PKZ.exe" (2010) and when I put "the greater than sign" to get the output file the command line simply stop and I needed type [Control] + [C] to break. I think it is because of the old "PKZ.exe".
Now, I tested with a 7ZA and worked.
Thanks a lot!
Erick
Força Sempre!
Strength Always!