on 08-13-2015 6:54 PM
Hi All ,
We have a requirement that we have to poll from one FTP Folder , that particular folder can have multiple file with same file name but with different time stamps .
We have to pick only the latest file while ignoring all the other files present there .
Any Suggestion ?
May be better way is to discuss with your sender and see if they can overwrite instead of creating a new file every time.
if that's not possible,you may want to try something like below(if you don't want to deal with scripts),
Trigger/Request(Proxy/dummy file) -> mapping (File lookup java UDF -> read content) -> receiver.
In the file lookup UDF, you can handle
-> getting the last modified file
->setting the other files to read only/delete them
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello,
there is no standard format in adapter to do this, we have to follow work around.
write OS script for this, below are the links for the same
If unix you can see an example script here:
http://www.computing.net/answers/dos/batch-file-to-rename-files-by-date/5517.html
If windows an example here:
http://en.kioskea.net/forum/affich-87157-finding-and-using-file-date-in-batch-command
You may need to change slightly to fit your exact requirements. But this would make you to start. Else you can also google to get the script. Here is one link:
http://www.google.com/#hl=en&source=hp&q=scripttorenamefileshavingtodaysdate&aq=f&aqi=m1&aql=&oq=&gs_rfai=CRE9SwTMsTNjiDpzGhgTm65iFCwAAAKoEBU_QC2i-&fp=e0fa4b5da4f245a4
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.