Skip to Content

How to add Date only in receiver channel(File in Target system should be filename_Date )

Hi SCN ppl,

From PI a file is been sent to receiver with filename as FILENAME_DATE_TIMESTAMP. Now I dont want timestamp only need date.

This is a pass through scenario. FileSender Channel uses NFS protocol and and receiver File Channel also uses NFS protocol.

I have checked in SCN on this and I could find that we can create dummy objects in ESR and import Java mapping or using Run operating system command.

Even variable sustitution ,but if the current date exists in payload then only we can use variable sustitution right.

Which is the best option to go with and how?

Any suggestions pls.



Add comment
10|10000 characters needed characters exceeded

  • Hi Sarika,

    There are total 3 options -

    1) Using dummy ESR you can use Java mapping.

    2) Custom module , but not recommended to use Java stack application module deployment for a single scenario which can be done through other options as well.

    3) As its is NFS, you can use OS command as well.



  • Hi Apu,

    If i go for OS command what exactly can be written their for the filename to be sent as filename_date .

    Any suggestions plsss..



  • Hello SCN experts,

    Can I know how to use OS command for changing the filename format as FILENAME_DATE.

    Pls respond.



  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Mar 01, 2017 at 10:56 AM

    Hi Sarika!

    You could use script to rename your target file.

    I'm not much experienced in shell scripts, but I had similar scenario where I used "Run OS command after message processing" in receiver file adapter.

    For Unix system script like this:

    mv $SRC $NEW

    will rename your target file removing the part starting from last underscore.

    Calling syntax should look like:

    /your/bash/script/path/ %F

    where %F is absolute target file name, provided by file adapter.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 28, 2017 at 12:02 PM


    You may use the custom module :

    Or do you have Advantaco or Seeburger in your landscape ?



    Add comment
    10|10000 characters needed characters exceeded

  • Mar 03, 2017 at 07:03 AM

    Hi ,

    We have used counter option in file construction and set the counter to 0000 as receiver channel is NFS transport protocol.

    And we achived filename as filename_datestamp.



    Add comment
    10|10000 characters needed characters exceeded