on 02-14-2016 8:03 AM
Hi Gurus,
I have few queries on File channel, Is it possible to check the directory before we fill the target directory through the file adapter. for example :
there is target directory D:/File Input, if this directory contains any documents, subsequently file adapter should not push any documents. how can we achieve this. please suggest me. thanks in advance .
Regards
Raja
Hello Raj,
You can try configuring the Source file name with extenstions.
For example to pick .txt files and to restrict .PDF files.
If you configure as *.txt only txt files will picked ignoring PDF files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajavadivel,
You cannot do this in receiver file adapter to check the files exist in target directory and stop processing if there is any files in target directory, you can do control this in sender side by using start and stop the channel externally (The sender channel should be external control), sender application before sending to PI you can check the directory is there any files exist in the target directory or not, if the files there don't send the data, if there is files in the target directory then you can start the sender communication channel externally After sending the data you must stop the channel again.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajavadivel,
You can do this by disable the check box Overwrite Existing File option in the receiver channel of section Processing parameters. Then if the same file ABC.txt exist in the directory then PI will not write the same file again to the directory, the message will fail with error saying the file is already exist cannot be overwritten, once the file has been removed from the directory then PI will write this file to the directory. You need to enable both send and receiver side adapter specific message attributes and select the File Name attribute.
Regards,
Praveen.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.