PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 22 → unzip GZ Files?
unzip GZ Files?
Débuté par Thomas Fidehli, 27 juin 2018 18:35 - 1 réponse
Posté le 27 juin 2018 - 18:35
Hi all,

i try to extract a *.gz file (help says: only support for *.tgz, *.tar, *.tar.gz...) but i keep the same error on all 4 variations.

With a *.zip it works like expected with the following code:
(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")


Do i miss something or have i use a external tool for that? I really need the *.gz one...

Best regards,
Thomas
Membre enregistré
20 messages
Posté le 09 juillet 2018 - 12:29
Found in a forum:

"I think in the old package repo days, .tgz was used because files on Dos floppies could only have three letter extensions. When this limitation was removed .tar.gz was used to be more verbose by showing both the archive type (tar) and zipper (gzip).

They are identical"

So I should try to rename the to extract file from extension .gz to .tgz and try to unzip it.

Regards,
Joey