How to Use the Script Wizard to Generate Script with Sysax FTP Automation (part 2)
March 10th, 2014 by Rossy GuideInstructions how to upload a file or folder
The ftpupload command can be used to upload either an individual file or an entire folder tree. The files and folders are uploaded to the current remote working path that was set using the ftpsetpath command.
o Setting local path:
The ftpsetpath command is used to set the current working path for the local system. The predefined keywords local is used to specify the local system. The path string contains the new path to be set. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.
Syntax for setting local path
ftpsetpath <keywords: local>, <path string>; |
Example of using the command for setting paths
ftpsetpath local, "c:\\ftptemp"; "set the current local working path |
The predefined keywords file and folder are used to specify either a file or a folder. An optional remote name string can be provided to save the uploaded item to a new name. If a wildcard name pattern is specified, all items matching that pattern are uploaded. If a new name is also provided, it is used for saving the first matching item. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.
Syntax for uploading files and folders
ftpupload <keywords: file, folder>, <local name string> [, optional: <remote name string>]; |
Examples of uploading files and folders
ftpupload file, "out_text.dat"; #upload file ftpupload file, "*.doc"; #upload all files in the current folder matching the pattern *.doc ftpupload file, "out_text.dat", "out_text_0503.dat"; #upload file and saving it as out_text_0503.dat ftpupload folder, "www"; #upload entire folder tree
|