cancel
Showing results for 
Search instead for 
Did you mean: 

Rename file in source directory

Former Member
0 Kudos

Hi all,

I have a scenario where we leave the flatfile in the sourcedirectory after we transported it via XI to the target. To make sure I do not send the same file twice I want to rename it right after the transport. So far I do not really know how.

Can someone help me?

Thanks

Cornelius

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

HI,

As mentioned by other reply, first option is you can Archive the files in the different folder.

http://help.sap.com/saphelp_nw2004s/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Second option is Executing a Shell Script from the Sender File Adapter using OS Command option.

You can archive with DateTimestamp..

Regards,

Moorthy

Message was edited by: Krishna Moorthy P

Former Member
0 Kudos

Please try whether the archiving option this will enable u to copy ur sending file to archive directory as xi picks the file and you no longer see that file once processed.

hope this helps

Vara

[PLEASE REWARD FOR POSTING]

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Cornelius,

probably you can try to use the archiving option in the sender file adapter and archive the file in the same directory, adding a timestamp to the original filename. In this case however you need to be careful with the file name pattern you specify for the selection.

What we typically do is to create a subdirectory archive of the original directory and move the files there...

Regards

Christine

Former Member
0 Kudos

Hi Christine,

my problem with the archiving function is that I need to put a certain tag in front of the filename to indicate the transfer. I am afraid that can not be done using the archiving function.

Cornelius

Former Member
0 Kudos

Cornelius Goldhahn,

In the file adapater, there is an option <b>command line</b> where u can enter operating system commands that have to executed after receiving the file.

In your case, it is renaming.

Hope this helps.

-Naveen.

Message was edited by: naveenkumar chitluri