Syntax:

PUTFILE2(file,save_as)

  • file: The file name of the file to be uploaded. This parameter can optionally include a path.
  • save_as: The file will be saved under this file name in the FTP server.

Remarks:

  • The saved_as parameter must contain no path, only a file name is allowed.
  • The file will be saved under the current remote directory. Use CHDIR to change it before calling PUTFILE2.

See also:

PUTFILE
SYNC

Command history:

This command was added in ScriptFTP version 3.3.

Example:

OPENHOST("127.0.0.1","carl","123456")
 
# Upload 1234.txt and save in under the name qwerty.txt
PUTFILE2("1234.txt","qwerty.txt")
 
# Upload the test.txt which is under the local directory
# C:\test and save in under the name qwerty.txt
PUTFILE2("C:\test\test.txt","qwerty.txt")
 
CLOSEHOST