on 10-18-2007 1:22 PM
Hi,
I have a scenario where I have to change the file names on the Receiver CC using a unix script and add date and timestamp to the file name
this is what I'll be writing to filename_01.xml I need to change that to newfilename_01_MMDDYYYY_HHMISS.xml
the 01 in the file name is the counter, so I might having more than one file where 01,02, etc will represent the counter on the filename.
Any help is really appreciated.
Thanks,
Joe.P
you can try this
create the field called filename in target
use a costant and concat it with the out out of UDF( or some functon avaleiable counter) which will genereate numbers like 1,2,3,4,5,6 and send this filename_01 to the output field and use this in the variable substution to genreate the filename by the CC
if you dnt want to send this fieldin output file then specify that fieldname in CC length as 0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for responding to my post, I'm using PI 7.0 the reason I did not go with counter in my message mapping since I'm not using FCC (file content conversion) I'm using file and using Add counter in the file processing parameter, and since I can either use a Add time stamp parameter or add counter in there, so I thought of using a unix script to rename the file names.
Thanks,
Joe.P
the only reason I have to use unix script is I don't have other option of adding a counter and also adding a timestamp to the file at the same time. So I've decided to use the Add counter option within the file processing parameters and use a separate run command after the message processing and rename all the filenames to add the timestamp at the end. I hope I was able to explain clearly.
Thanks,
Joe.P
you use theoptio to adad the counter and add the timestamp in the mapping and concat with the filename and use it in variabel substution....
else
add counter to the filename in mapping using the UDF and select the time stamp in receiver adaapter.... evn when you processing XML you can achive this i belive....
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.