Skip to Content
avatar image
Former Member

Archiving filename issue

Hi Experts,

I am doing a file to file scenario. After successful processing of the file from FTP, I am archiving this file to the different folder on the same FTP.

For example:

IF Sender File = test.xml, Receiver File should be test_<timestamp>.xml. But, I am getting the receiver format as <timestamp>_test.xml

What should I do in order to get the correct format?

Appreciate for the help.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 25, 2013 at 09:27 PM


    I don't think we have much control over where PI puts the timestamp when using the checkbox in the File Adapter settings.

    However, you can have complete control over the the filename format that you want as a text string in mapping, and then pass that as a parameter to the File Receiver channel using Adapter-Specific message Attributes on the Advanced tab. There are good examples for this:

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Amit and Venkat,

      Thank you for the replies. Can you please tell me the detail steps how to achieve this.

      This is what I have done until now. I have created a new CC for Receiver under the same business system of sender CC.

      For the new Receiver CC, I have selected the transport protocol as "FTP", Message protocol as "File", Adapter Engine as "Integration Server".

      Under the target tab:

      I have selected the target directory where the processed file should go and sit (Ex: \abc\testdata\file

      selected the check box : Create target directory

      File Name Scheme: I have given the same as sender CC file scheme (Ex: sender CC = test.xml, I have given the same thing here)

      FTP Connection Parameters:

      Server: Given the PI server name

      Port : 21

      Data Connection: Active

      Connection Security: None

      Username: system user name

      PW: system PW

      Connection Mode: Permanently

      Transfer Mode: Text

      Processing Tab:

      File construction Mode: Add Time Stamp

      Put File: Directly

      Empty-Message Handling: Ignore

      File type: Text

      Advanced Tab: Please let me what I need to fill here. (Venkat has pasted some code in his previous reply. Wher do I need to put this code?)

      Final Output needed is:

      Sender CC File = test.xml

      PI Server Receiver File = <timestamp>.test.xml

      Would really appreciate your help in achieving this.