Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Code Boxes added

...

The following code boxes can be opened to show the Profile and ProtocolFragments used in this example in XML and in settings.ini formats.

Code Block
titleThe 'ftp_server_2_local_select_recursive' Profile in XML Format
collapsetrue
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_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
titleThe 'ftp_server_2_local_select_recursive' Profile in settings.ini Format
collapsetrue
[protocol_fragment_ftp@ftp_demo_sos-berlin]
protocol                            = ftp

host                                = test.sos-berlin.com
user                                = demo
password                            = demo

[ftp_server_2_local_select_recursive]
operation                           = copy

source_include                      = protocol_fragment_ftp@ftp_demo_sos-berlin
file_spec                           = ^test_.\.txt$
source_dir                          = ./rec
recursive                           = true

target_protocol                     = local
target_dir                          = ${USERPROFILE}\jade_demo\a

 
Code Block
titlesettings.ini
collapsetrue
 
Running the Profile

This profile is called on Windows systems using one of the following commands, depending on the JADE version being used:

...

The screenshot also shows the relevant extract from the parameter reference for the TransferZeroByteFiles element with a description of the meaning of the different values the TransferZeroByteFiles element can have.

 

Code Block
titleThe 'ftp_server_2_local_zero_byte' Profile in XML Format
collapsetrue
<?xml version="1.0" encoding="utf-8"?>
<Configurations xsi:noNamespaceSchemaLocation="http://www.sos-berlin.com/schema/jade/JADE_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
titleThe 'ftp_server_2_local_zero_byte' Profile in settings.ini Format
[protocol_fragment_ftp@ftp_demo_sos-berlin]
protocol                            = ftp

host                                = test.sos-berlin.com
user                                = demo
password                            = demo


[ftp_server_2_local_zero_byte]
operation                           = copy

source_include                      = protocol_fragment_ftp@ftp_demo_sos-berlin
file_spec                           = .*
source_dir                          = ./
force_files                         = false
zero_byte_transfer                  = false

target_protocol                     = local
target_dir                          = ${USERPROFILE}\jade_demo\a

This profile is called on Windows systems using one of the following commands, depending on the JADE version being used:

...