decorative banner

Previous | Next               Table Of Contents > 4 File system commands > 4.6 Compressing and uncompressing local files and folders

4.6 Compressing and uncompressing local files and folders


Files and folders can be compressed using the ftpcompress command. The name string specifies the file or folder to compress. If compression is successful, the output name variable contains the name of the compressed file and the ftpresult predefined status flag is set to the predefined constant success.

The syntax is

ftpcompress <name string>, <output name variable>;

Some examples are

ftpcompress "www_folder", ~zip_file_name; #compress a folder and all its contents

ftpcompress "index.txt"; #compress a file

 

A compressed file can be uncompressed using the ftpuncompress command. The name string specifies the file to be uncompressed. The zip, gz, tar.gz, and tgz compressed file formats are supported. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

The syntax is

ftpuncompress <name string>;

Some examples are

ftpuncompress "in22.tar.gz"; #uncompress a tar.gz file

ftpuncompress "dw441.zip"; #uncompress a zip file


Previous | Next