compress a file with gzip

redsuitee

Member
I need to compress a file with gzip through openedge editor but I don't know how, is it possible?
Anybody please help.
 

rzr

Member
I don't have access to *nix now, but could you try ... OS-COMMAND SILENT VALUE(vGZIPCommand).
where vGZIPCommand is your gzip command (ex: gzip -c myfile > myzipfile.gz) ?
 

SergioC

Member
Hello, I did not use GZIP but this may serve as a guide you:

DEFINE VARIABLE c-file1 AS CHAR.
DEFINE VARIABLE c-file2 AS CHAR.


c-file1 = "C:\TEMP\citivta.zip".
c-file2 = "C:\TEMP\citivta.txt".


OS-COMMAND SILENT VALUE("z-rar.bat " + c-file1 + ' ' + c-file2).

Generate a batch file (z-rar.bat) as follows.

@echo off
set OLDPATH=%PATH%
set PATH=C:\Archivos de programa\WinRAR\;%PATH%
rar a -ep %1 %2
set PATH=%OLDPATH%

Regards.
 

RealHeavyDude

Well-Known Member
Basically you can submit every OS command through the ABL using OS-COMMAND. You just need to be aware, especially on *nix systems, there might be security issues because the sub process started from the ABL to execute the OS command obviously can not elevate it's privileges.

Heavy Regards, RealHeavyDude.
 
Top