What: This command permits to put a file on a FTP server.
EXECUTE put WITH {<Res:file>} ON {<Tar:ftp.target>} AS $() USING $(remotepath : <distantPath> [,filetype : <FileType>] )
Input:
<Res:file>: The name of the resource (in the context) which references the file to put on the FTP server (Resource of category file).
<Tar:ftp.target>: The name (in the context) of the FTP server to use. (Target of category ftp.target)
<distantPath>: It corresponds to the file path on the FTP server, relatively to the home directory.
<fileType>: It permits to decribe the type of your file. 2 values are possible: 'ascii' or 'binary'.
Remarks:
If in the path 'distantPath' some directories don't exist on the server so they are created.
If the property 'filetype' is indicated in the configuration file of the FTP target and via the instruction, the value defined in the instruction prime.
Example:
LOAD path/to/my_file_to_put.txt AS my_file_to_put.file
EXECUTE put WITH my_file_to_put.file ON myFTP-server USING $( remotepath : path/to/put/distant_name.txt) AS $()
What: This command permits to get a file from a FTP server.
EXECUTE get WITH $() ON {<Tar:ftp.target>} AS {result<Res:file>} USING $(remotepath : <distantPath> [,filetype : <FileType>] )
Input:
<Tar:ftp.target>: The name (in the context) of the FTP server to use. (Target of category ftp.target)
<distantPath>: It corresponds to the file path on the FTP server, relatively to the home directory of the file you want to get.
<fileType>: It permits to decribe the type of your file. 2 values are possible: 'ascii' or 'binary'.
result<Res:file>: The name of the resource which references the file you get from the FTP server (Resource of category file)
Remark: If the property 'filetype' is indicated in the configuration file of the FTP target and via the instruction, the value defined in the instruction prime.
Example:
EXECUTE get WITH $() ON myFTP-server USING $( remotepath : path/to/get/FileToGet) AS getFile.file
What: This command permits to delete a file located on a FTP server.
EXECUTE delete WITH $() ON {<Tar:ftp.target>} AS $() USING $(remotepath : <distantPath> [,failIfDoesNotExist : false] )
Input:
<Tar:ftp.target>: The name (in the context) of the FTP server to use. (Target of category ftp.target)
<distantPath>: It corresponds to the file path on the FTP server, relatively to the home directory of the file you want to delete.
'failIfDoesNotExist: false': It allows to specify to Squash-TA that the test must not fail if the file we're trying to delete doesn't exist.
Remarks:
DistantPath can indicate a file OR a directory.To represent a directory, the path should end with the character '/'.
The suppression of a directory is recursive: suppression of all sub-directories and files.
Example:
EXECUTE delete WITH $() ON myFTP-server USING $( remotepath : path/to/myfile.txt, failIfDoesNotExist: false) AS $()