FTP Plugin - Commands¶
Contents :
‘put’ ‘file’ on ‘ftp’¶
What ?
This command allows 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 (filetype resource).{<Tar:ftp.target>}: The name (in the context) of the FTP server to use (ftp.targettype target).{<distantPath>}: It corresponds to the file path on the FTP server, relatively to the home directory.{<fileType>}: It allows 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 $() |
‘put’ ‘folder’ on ‘ftp’¶
What ?
This command allows to put a folder on a FTP server.
| EXECUTE putFolder WITH {<Res:directory>} ON {<Tar:ftp.target>} AS {void} USING $(remotepath : <distantPath>) |
> Input :
{<Res:directory>}: The name of the resource (in the context) which references the folder to put on the FTP server (directorytype resource).{<Tar:ftp.target>}: The name (in the context) of the FTP server to use (ftp.targettype target).{<distantPath>}: It corresponds to the folder path on the FTP server, relatively to the home directory.
Remarks :
- If in the path
{<distantPath>}some directories don’t exist on the server so they are created.
Example :
LOAD path/my_folder_to_put AS my_folder_to_put.file CONVERT my_folder_to_put.file TO directory AS my_folder_to_put.dir EXECUTE putFolder WITH my_folder_to_put.dir ON myFTP-server USING $( remotepath : path/to/put/distant_folder_name) AS {void} |
‘get’ ‘file’ on ‘ftp’¶
What ?
This command allows 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. (ftp.targettype 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 allows 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 (filetype resource).
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 predominates.
Example :
| EXECUTE get WITH $() ON myFTP-server USING $( remotepath : path/to/get/FileToGet) AS getFile.file |
‘get’ ‘folder’ on ‘ftp’¶
What ?
This command allows to get a folder (with all its content) from a FTP server.
| EXECUTE getFolder WITH {void} ON {<Tar:ftp.target>} AS {result<Res:directory>} USING $(remotepath : <distantPath>) |
> Input :
{<Tar:ftp.target>}: The name (in the context) of the FTP server to use. (ftp.targettype target){<distantPath>}: It corresponds to the folder path on the FTP server, relatively to the home directory of the folder you want to get.{result<Res:directory>}: The name of the resource which references the folder you get from the FTP server (directorytype resource).
Example :
| EXECUTE getFolder WITH {void} ON myFTP-server USING $( remotepath : path/to/get/FolderToGet) AS getFolder.dir |
‘delete’ ‘file’ on ‘ftp’¶
What ?
This command allows 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. (ftp.targettype 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 TF that the test must not fail if the file we’re trying to delete doesn’t exist.
Example :
| EXECUTE delete WITH $() ON myFTP-server USING $( remotepath : path/to/myfile.txt, failIfDoesNotExist: false) AS $() |
‘delete’ ‘folder’ on ‘ftp’¶
What ?
This command allows to delete a directory with its content located on a FTP server.
| EXECUTE deleteFolder WITH {void} ON {<Tar:ftp.target>} AS {void} USING $(remotepath : <distantPath> [,failIfDoesNotExist : false] ) |
> Input :
{<Tar:ftp.target>}: The name (in the context) of the FTP server to use. (ftp.targettype target){<distantPath>}: It corresponds to the folder’s path on the FTP server, relatively to the home directory of the folder you want to delete.'failIfDoesNotExist: false': It allows to specify to Squash TF that the test must not fail if the folder we’re trying to delete doesn’t exist.
Example :
| EXECUTE deleteFolder WITH {void} ON myFTP-server USING $( remotepath : path/to/myFolder, failIfDoesNotExist: false) AS {void} |