Re: how to compress files
- Posted by jimcbrown (admin) Nov 10, 2013
- 1727 views
sergelli said...
My version is deprecated.
gzip -V
gzip 1.3.12
I missed that you said gzip.exe earlier. This works fine on a sane OS, but you can't do redirection with system_exec() on Windoze. That never worked.
Copying the original file and then compressing the copy with gzip (without either -c or redirection) should still work with system_exec(). This is probably the easiest method, if you have enough space to make a full sized copy of the original file.
Or you can use system(), and find some other method to determine if gzip was successful or not. (Perhaps an MS-DOS batch script that writes the return code of gzip into a text file.)
Or you can use pipeio and write code to take the output of gzip and place it into a file yourself.