Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

Syntax:

OUTPUTDETAIL(mode)

Parameters:

mode
SILENT ScriptFTP will only show errors, transferred files and PRINT messages. All information other than that about the script run will be suppressed.
NORMAL This is the default. ScriptFTP will show the command calls, command messages and any errors encountered during the script run.
VERBOSE ScriptFTP will show the dialog with the FTP server, DNS resolving issues and connection loss messages.
DEBUG Equivalent to VERBOSE but also show internal ScriptFTP messages.

Remarks:

This command is useful to find out in detail what is happening during the script run. On VERBOSE and DEBIG modes ScriptFTP will show the following information:

        • The dialog between ScriptFTP and the FTP server.
        • DNS resolving issues.
        • Connection loss messages.
        • Debug information about the status of ScriptFTP or the command currently executed. (DEBUG)

This command is usually put at the beginning of a script file.

Return value:

This command always returns “OK”.

See also:

SILENT (deprecated since version 4.1)
VERBOSE (deprecated since version 4.1)
LOGTO
PRINT

Command history:

This command was introduced in ScriptFTP version 4.1 to replace the VERBOSE and SILENT commands.

Example:

# Enable verbose mode
OUTPUTDETAIL(VERBOSE)
 
# Connect to server
OPENHOST("127.0.0.1","myuser","mypassword")
 
# Upload files
PUTFILE("*.*")
 
# Close connection
CLOSEHOST

The output of the script above is the following:

 

verbose_example

 

Example:

# Enable silent mode. Only transferred files and error will be shown
OUTPUTDETAIL(SILENT)
 
# Connect to FTP server
OPENHOST("127.0.0.1","carlos","123456")
 
# Download some files
GETFILE("*.*")
 
# Close the connection
CLOSEHOST

The script output of the above example is the following. Note that the commands are not shown:

silent_example

Example:

# Display and log transferred files and errors only
OUTPUTDETAIL(SILENT)
 
# Log script run to a text file
LOGTO("C:\logs\TransferLog.txt")
 
# Connect to server
OPENHOST("ftp.host.com","myuser","mypassword")
 
# Create the remote directory /sources
MKDIR("/sources")
 
# Disable silent mode
OUTPUTDETAIL(NORMAL)
 
# Change current remote directory
CHDIR("/sources")
 
# Re-enable silent mode
OUTPUTDETAIL(SILENT)
 
# Upload files
PUTFILE("C:\PICS\*.gif")
 
# Close connection
CLOSEHOST