Script

FTP

The professional tool to automate FTP, SFTP, FTPS and Batch FTP

Syntax:

STOPLOG()

Remarks:

This command is useful if, for example, you are about to send by email the log file, delete or upload it to another place. It makes ScriptFTP to close the log file and unlock it.

stop log example

See also:

LOGTO
VERBOSE
SILENT

Examples:

# Connect to the FTP server
$result=OPENHOST("127.0.0.1","carl","123456")
 
# If the connection attempt fails stops the
# execution of the script
IF($result!="OK")
    STOP
END IF
 
# Start logging the downloaded files to a text file
LOGTO("transfer_log.txt",APPEND)
 
# Download the files
GETFILE("*.*")
 
# Stop logging
STOPLOG
 
# Close the connection with the FTP server
CLOSEHOST
LOGTO("C:\path_to\mylogfile1.txt")
#
#
# commands here. output is logged to mylogfile1.txt
#
#
STOPLOG
LOGTO("C:\path_to\mylogfile1.txt")
#
#
# more commands here. output is logged to mylogfile2.txt
#
#