...
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
File Transfer
- Checking files for completeness
- Public / Private Key Authentication
- Transfer via a Jump Host / DMZ
...
Code Block |
---|
title | The 'ftp_server_2_local_select_recursive' Profile in XML Format |
---|
collapse | true |
---|
|
<?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> |
...
Code Block |
---|
title | Running the file transfer settings.ini configuration in Windows format (JADE YADE 1.10 and earlier) |
---|
|
jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_select_recursive" |
Code Block |
---|
title | Running the file transfer XML configuration in Windows format (JADE YADE 1.11 and later) |
---|
|
jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_select.xml" -profile="ftp_server_2_local_select_recursive" |
...
Code Block |
---|
title | Running the file transfer settings.ini configuration in Unix format (JADE YADE 1.10 and earlier) |
---|
|
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_select_recursive" |
Code Block |
---|
title | Running the file transfer XML configuration in Unix format (JADE YADE 1.11 and later) |
---|
|
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.xml" -profile="ftp_server_2_local_select_recursive" |
...
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 |
---|
title | The 'ftp_server_2_local_zero_byte' Profile in XML Format |
---|
collapse | true |
---|
|
<?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 |
---|
title | Running the file transfer settings.ini configuration in Windows format (JADE YADE 1.10 and earlier) |
---|
|
jade.cmd -settings="%USERPROFILE%\jade_demo\sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_zero_byte" |
Code Block |
---|
title | Running the file transfer XML configuration in Windows format (JADE YADE 1.11 and later) |
---|
|
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 |
---|
title | Running the file transfer settings.ini configuration in Unix format (JADE YADE 1.10 and earlier) |
---|
|
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.ini" -profile="ftp_server_2_local_zero_byte" |
Code Block |
---|
title | Running the file transfer XML configuration in Unix format (JADE YADE 1.11 and later) |
---|
|
./jade.sh -settings="${HOME}/jade_demo/sos-berlin_demo_2_local_select.xml" -profile="ftp_server_2_local_zero_byte" |
...