Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Question:
We would like to schedule file transfer from Application A (Solaris) to Application B (AS400), where Application A generates files with a timestamp ABC_25042014.txt
in folder D:/A_Folder/
.
...
The time at which the files to be transferred are created is not fixed and can be any time in the day.
The file size is around 100Mb100MB.
Answer:
File Selection:
JADE uses "RegularExpressions"regular expressions, with a small an extension for timestamps. File selection should be specified using the "file_spec" parameter parameter with a variable part for the timestamp.
For example:
Code Block |
---|
file_spec=^ABC_[date:ddMMyyyy].\txt$
|
This file_spec value will select all files in the source_folder (and in subfolders, if the recursive parameter is set to "true
") , which have that contain the current date as part of in the filename. It is not necesssary required to change adjust this parameter every day
File Generation:
...
- if the time
...
- when the file is created is not fixed then a "file polling" could be specified. This is done by setting the
...
- poll_*
...
- parameters as shown, for example, for
...
- Server-to-Server File Transfer in our "Server to Server Transfer with Polling" FAQ. You can achieve a reliable solution using this approach together with the "steady state" function as described in our "Check File for completeness Steady state" FAQ.
- If the
...
- file names e.g. in your AS/400
...
- system use a different syntax to the
...
- file name in the Solaris
...
- system then JADE will be able to rename the files on the target server
...
- if the
...
- target_replace
...
- and
...
- target_replacing
...
- parameters are correctly set. A rename at the source, after transfer, could be possible as well.
- This solution works for
...
- FTP,
...
- FTPS and
...
- SFTP and for any other JADE data provider
...
- .
See also
...