The professional tool to automate FTP and secure FTP transfers. Automated FTP & Batch FTP |
Log script messages to a text file.
Syntax: LOGTO(file,APPEND)
Return value:
This command will return "OK" or else an error code if something went wrong opening the log file.
Remarks:
If the file exists it will be overwritten, use the APPEND parameter to change this behaviour.
See also:
Logging ScriptFTP messages
Examples:
LOGTO("C:\logs\TransferLog.txt",APPEND)
OPENHOST("ftp.host.com","myuser","mypassword")
PUTFILE("C:\PICS\*.jpg")
CLOSEHOST
# Get the current date
$date=GETDATE()
# Concatenate "BACKUP", the current date and ".txt" to build the log file name
$logfile="C:\BACKUP_LOGS\BACKUP-".$date.".txt"
# Start logging
LOGTO($logfile)
OPENHOST("ftp.host.com","myuser","mypassword")
PUTFILE("C:\PICS\*.jpg")
CLOSEHOST