cancel
Showing results for 
Search instead for 
Did you mean: 

File to File interface - Help Required

Former Member
0 Kudos

Hello All,

We have the below business requirement:

In the source directory, we would receive multiple .dat and one .txt files. Before picking up any of the file, we need to check whether the .txt file exists in the folder or not.

If the .txt file exists, only then pick the .dat files and move them to target directory, else dont do any action until the .txt files comes into the folder.

Also, the dat and txt files have to be moved to the target directory in a sequence(i.e. first the dat files have to be moved and then finally txt file has to be moved).

Please help in providing an approach preferably with the standard sender file channel options.

Thanks in advance.

Regards,

Subbu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The easiest design as suggested above is to have the shell script run on FTP/Source server run to search for txt file and the moment it has a txt file it will move both dat and txt files to an other folder.

XI Adapter would poll to the new folder ... it would be interesting not to use BPM here with channel synchronization/scheduling.

It would be a tedious task for XI to create connection to FTP just to check if txt file has arrived or not in that case here what it looks like

Regards

Kishore

Answers (5)

Answers (5)

Former Member
0 Kudos

Try this option

Source Directory: /yourSourceDir

FileName : File1.xml

In Additional Files:

File List: File2.xml

File2.xml.namePart - "File1.xml" = "File2.xml"

File2.xml.optional - NO

File2.xml.type - xml

by having this settings, File1 will be picked only when File2 is placed in the folder.

Regards

former_member192295
Active Contributor
0 Kudos

Hi,

We can fulfill your requirement through DOS script file. Write DOS script file according to your requirement and run it from before comment prompt. This is easiest way to workout.

Former Member
0 Kudos

You can design one dummy interface, which will simply poll for the .txt file. Once the .txt file found it will move the file from one directory to target directory. In the sender adapter of the .txt file, you can use command line option to execute a script to move the .dat files to another temporary folder.

Design another interface, whose sender adapter will poll for .dat files from the temporary folder.

Hope this will help.

Shyamalima

Former Member
0 Kudos

use run time operating command and write a script which will perform the same operation-- I have not tried anytime but u have to investigate.

Former Member
0 Kudos

You can use a BPM,

Start with Sender CC .txt FIle -> Start Sender CC .dat File -> Go to receiver CC

Another idea, is to use a Shell Script in a CC Sender .txt File. Sender CC .txt start -> Shell Script Send .dat File Before Processing -> Receiver .txt File