Use the JUNOScript file-put and file-get operations to move a file to or from a remote server. Especially useful when the remote server sits outside a firewall, these commands move the files using the existing JUNOScript stream. This obviates the need to open a separate stream for the file transfer, handle authentication before moving files, and verify that the file transfer service is available.
Use the JUNOScript file-put command to transfer files within an existing remote JUNOScript connection. The basic syntax for using the file-put command is as follows:
<rpc>
<file-put>
<filename>value</filename>
<encoding>value</encoding>
<permission>value</permission>
<delete-if-exist />
<file-contents>file</file-contents>
</file-put>
</rpc>
The following attributes are used with the file-put command. These attributes can be placed in any order with the exception of the file-contents attribute. The file-contents attribute must be the last attribute used with the file-put command.
The JUNOScript file-get command can be used to transfer files within an existing remote JUNOScript connection. Unless otherwise specified by the user, the imported file will be placed in the user’s home directory. The basic syntax for using the file-get command is as follows:
<rpc>
<file-get>
<filename>value</filename>
<encoding>value</encoding>
</file-put>
</rpc>
The following attributes are used with the file-get command.