on 07-01-2010 5:20 AM
Hello All,
I have an FTP server where files are created with current date as PO_CONFIRM_20100701.txt.
Need to pick the file based on current date. How to pick the above file format using file sender adapter. i.e what file pattern can we use so that file will be picked only on today's date
Regards,
Sreenivas.
HI Sreenivas,
The best possible solution for your issue are:
1. Archive the files, so that the files would be processed as usual.
2. You can add an additional field in the structure and use "Currentdate" function. With reference to this perform Variable substitution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreenivas,
Just a thought on this..
pick the file as soon as it is created using a sender FTP , then place it in another FTP folder with adding the time stamp.
Now you can write a script to find based on the current time or set a filter for the day you want to pick the files.
Regards,
Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
I feel we dont have a direct option for this. But one work around comes to mind is I assume you are picking up all the files once in a day. You can write a script at OS level and let the script puts todays file in the directory which xi is polling and rest in other directory. This is just a work around. Else you may need to come with your own module.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
It depends upon the OS you are using. 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
Regards,
---Satish
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.