cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible get special file in file sender adapter?

Former Member
0 Kudos

Hi every SDNer.

I want to get special file. for example like PJ<today>_return.dat

Well, to paraphrase Marx, One folder has too many files. but I want one file in that folder.

The rule is simple. if today is 20/07/2007 then I get the file as "PJ20070720_return.dat".

How can i configuration File Sender Adapter?

Accepted Solutions (1)

Accepted Solutions (1)

former_member184543
Active Participant
0 Kudos

I think i mis read this as File Receiver and posted something earlier.. Sorry... But do u want this in the File name in the output or this in the Sender to pick this file??

Message was edited by:

Sanjo Eapen

Message was edited by:

Sanjo Eapen

Former Member
0 Kudos

Yes Sanjo.

I want pick up the file. This is File Sender Adapter.

for example,

date file name

2007-07-20 PJ20070720_return.dat

2007-07-21 PJ20070721_return.dat

...

Former Member
0 Kudos

Hi,

as far as I remeber it is possible -- you just have to specify it in file adapter properties. Not sure if there are chance to generate name from date or so, but at least to select all what contains 'PJ' shall be possible.

i even found it in help -- http://help.sap.com/saphelp_nw04s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm -- check chapter about file name

and just hint -- you can remove processed files too by copying them in subdirectory.

BR, Artem

remember points

Message was edited by: Artem

Artem Ruzak

Former Member
0 Kudos

Park,

If you are file naming conventions are like this:

2007-07-20 PJ20070720_return.dat

2007-07-21 PJ20070721_return.dat

then you can specify PJ so that both the above files will be picked up by File sender communication channel.

Regards,

---Saitsh

Former Member
0 Kudos

Dont have an XI system in front of me, but if I recall correctly, your options are pretty limited. The list of parameters in Advanced Selection for Source File does not include a date Better selection parms with the receiver channels.

As such you may have to resort to writing a script on the OS that will do the following every minute... (basically run it more frequently than your channel)

- look in that directory through all the PJ* files containing date = 'today'

- rename the file to REAL_PJ_..... (for example)

In your channel, pick the file REAL* and archive accordingly so it's not picked again by your script.

If you find alternatives via cchannel - publish your results.

sincerely,

--NM

Former Member
0 Kudos

Yes! right Naomi.

I think your answer will be the last choice.

I have some limit condition.

1. must pick up one file in one folder which has many files.

2. that file's rule is PJ<date>_return.dat. ( : date is today )

3. Can not move the picked file to any folder.

Former Member
0 Kudos

Can you rename files in the folder?

If so, when your cchannel picks up the file real_pj*.dat

Rename it to real-done_pj....

In your script skip all of today's files that have done and set some flag to true once you find a file.

Of course if its one date file per day - no issue there.

sincerely,

--NM

ps: if you find alternatives strictly via cchannel - publish your results.

Former Member
0 Kudos

Thank you Naomi.

if i get alternatives answer, i will publish.

i think you will be very clever. hehe

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

Nothing much required at file sender

Use adapter specific message attributes.

See this

Regards,

Prateek

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Specify the name of the file in the file adapter and Shall i know whether you want to read the generated files dynamically

Regards

Agasthuri Doss