Syntax:

RAWCOMMAND(command)

  • command: complete command including any parameters.

Remarks:

  • Some FTP servers are capable of special or non-standard operations that are not supported directly by the set of commands ScriptFTP provides. RAWCOMMAND allows you to execute these operations by sending the given command to the FTP server. ScriptFTP will not carry out any further processing of the command you indicate. It will just pass it on to the server via the FTP control connection and then wait for a response.
  • RAWCOMMAND is the ScriptFTP’s equivalent to the windows ftp.exe’s quote. For example:

    quote SITE RECFM=U

    Produces the same results as:

    RAWCOMMAND("SITE RECFM=U")

Return value:

RAWCOMMAND will return the reply code sent by the FTP server.

Command history:

This command replaces QUOTE since the ScriptFTP 3.0 release

Example:

# Adding an FTP user within an FTP session is
# supported by the Apache FTP server. This
# script adds the user carl and then lists the
# current FTP users.
 
OPENHOST("ftp.myhost.com","myuser","mypassword")
 
# Add a FTP user
RAWCOMMAND("SITE ADDUSER carl")
 
# List users
RAWCOMMAND("SITE LISTUSER")
 
CLOSEHOST