Script Library

Sample scripts are provided as-is with no warranty of fitness for a particular purpose. These scripts are solely intended to demonstrate techniques for accomplishing common tasks. Additional script logic and error-handling may need to be added to achieve the desired results in your specific environment.


gzip.s

Download

Robo-FTP includes built-in support for unzipping .zip files using the UNZIP command. However, sometimes customers need to work with archives in other formats like .gz, .bz2, etc.

You can use Robo-FTP's EXEC command to call a separate utility to handle these file formats.

This sample script shows how to use the EXEC command to call gzip to extract a .gz archive.

First, download the freely available Windows version of gzip from here: http://gnuwin32.sourceforge.net/packages/gzip.htm

Extract that zip file into the Robo-FTP installation directory (C:\Program Files (x86)\Robo-FTP 3.9 for Robo-FTP 3.9 on a 32-bit system by default).

Modify the second line of the script to point to the full path of the archive you want to extract.


  1  SET program = %installdir + "\gzip.exe"
  2  SET file = "c:\data\myfile.gz"
  3  EXEC program /passargs "-d" file

Browse complete list of scripts