PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Extract a *.gz
Extract a *.gz
Iniciado por thomas.fidehli, 27,jun. 2018 18:26 - No hay respuesta
Publicado el 27,junio 2018 - 18:26
Hi all,

i try to extract an *.gz file (ok, the help tells me that zipExtractAll it only supports *.tar, *.tgz, *.tar.gz), but it always says "The Archive is corrupt" (also tried with *.tar, *.tgz, *.tar.gz => same error), but i can open it with e.g. 7zip.

A *.zip works with the code below.

My code is: (aFile is the fullpath to the file)
nErr=zipOpen("MyArchive",AFile)
IF nErr=0 THEN
nErr=zipExtractAll("MyArchive",fExtractPath(AFile, fDrive + fDirectory))
END
IF nErr>0 THEN
Error("Error unzipping file.",zipMsgError(nErr))
END
zipClose("MyArchive")


I really need this for *.gz, but with the same error on *.tar, *.tgz, *.tar.gz maybe i miss something here?

Best regards,
Thomas