The professional tool to automate FTP and secure FTP transfers. Automated FTP & Batch FTP

GETENV

Read a system environment variable.

Syntax: GETENV(variable)

  • variable: name of the environment variable.

Examples:

# Show the path
p=GETENV("PATH")
PRINT(p)


# Log to C:\windows\temp\log-YYYYMMDD.txt
$logfile=GETENV("TEMP")."log-".GETDATE(FORMAT3).".txt"
LOGTO($logfile)

OPENHOST("ftp.scriptftp.com","john","123456")
PUTFILE("C:\ClientDocs\*.*",SUBDIRS)
CLOSEHOST