...
This is the second in a series of articles and describes how to perform simple file selection with the YADE Client via its Command Line Interface.
...
YADE Tutorials List
...
YADE Client Command Line Interface
- Getting Started and Downloading files
- Simple File Selection
- More Advanced File Selection
- Checking files for completeness
- Public / Private Key Authentication
- Transfer via a Jump Host / DMZ
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jadeyade/JADEYADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <FTPFragment name="ftp_demo_sos-berlin"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> </BasicConnection> <BasicAuthentication> <Account><![CDATA[demo]]></Account> <Password><![CDATA[demo]]></Password> </BasicAuthentication> </FTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="ftp_server_2_local_select_recursive"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <FTPFragmentRef ref="ftp_demo_sos-berlin" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[^test_.\.txt$]]></FileSpec> <Directory><![CDATA[./rec]]></Directory> <Recursive>true</Recursive> </FileSpecSelection> </Selection> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations> |
...
If, however, the DisableErrorOnNoFilesFound element is set to true, JADE YADE will not throw an error.
Note:
- The meaning of the values true and false for the DisableErrorOnNoFilesFound element are the opposite to the meaning for the element's
settings.ini
file predecessor, force_files.
Zero-Byte Files
The JADE YADE Client can handle files with zero bytes in a number of ways, depending on the setting used for the TransferZeroByteFiles parameter, which is specified as a child of the Directives element.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="utf-8"?> <Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jadeyade/JADEYADE_configuration_v1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Fragments> <ProtocolFragments> <FTPFragment name="ftp_demo_sos-berlin"> <BasicConnection> <Hostname><![CDATA[test.sos-berlin.com]]></Hostname> </BasicConnection> <BasicAuthentication> <Account><![CDATA[demo]]></Account> <Password><![CDATA[demo]]></Password> </BasicAuthentication> </FTPFragment> </ProtocolFragments> </Fragments> <Profiles> <Profile profile_id="ftp_server_2_local_zero_byte"> <Operation> <Copy> <CopySource> <CopySourceFragmentRef> <FTPFragmentRef ref="ftp_demo_sos-berlin" /> </CopySourceFragmentRef> <SourceFileOptions> <Selection> <FileSpecSelection> <FileSpec><![CDATA[.*]]></FileSpec> <Directory><![CDATA[./]]></Directory> </FileSpecSelection> </Selection> <Directives> <DisableErrorOnNoFilesFound>true</DisableErrorOnNoFilesFound> <TransferZeroByteFiles><![CDATA[false]]></TransferZeroByteFiles> </Directives> </SourceFileOptions> </CopySource> <CopyTarget> <CopyTargetFragmentRef> <LocalTarget /> </CopyTargetFragmentRef> <Directory><![CDATA[${USERPROFILE}\jade_demo\a]]></Directory> </CopyTarget> </Copy> </Operation> </Profile> </Profiles> </Configurations> |
...
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_zero_byte" |
Code Block | ||
---|---|---|
| ||
jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_select.xml" -profile="ftp_server_2_local_zero_byte" |
On Unix systems the profile is called using one of the following commands, depending on the JADE YADE version being used:
Code Block | ||
---|---|---|
| ||
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_zero_byte" |
Code Block | ||
---|---|---|
| ||
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.xml" -profile="ftp_server_2_local_zero_byte" |
...