IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Manipulating file renames

    Posted Tue January 19, 2021 04:54 AM

    In Active Transfer, is there a way to manipulate filenames? For example, I have a control file that I want to move to an archive directory:

    CONTROL_FILE.txt

    When I move it to the archive directory I want to rename it thus (I know how to do this):

    CONTROL_FILE.txt.20210119

    However, there is a slight twist to this. I want to append the date of the previous day so filename should be:

    CONTROL_FILE.txt.20210118

    Is this possible?


    #Managed-File-Transfer
    #webMethods
    #B2B-Integration


  • 2.  RE: Manipulating file renames

    Posted Tue January 19, 2021 06:39 AM

    Hi Yunus,

    This is not possible using server variables. We do support different server variables for date and time (as I think you already know them), however manipulation of these data is not possible.

    You can however achieve this by writing a IS flow/java service that give the next file name as output. You can have your logic on the service to come up with the filename you want to rename to. This service output can be extracted in your event and can be used as server variable in subsequent actions, rename in your case.

    Hope this helps.

    Thanks,
    Bhaskar


    #Managed-File-Transfer
    #B2B-Integration
    #webMethods


  • 3.  RE: Manipulating file renames

    Posted Tue January 19, 2021 09:45 AM

    Hello Bhaskar

    So I got the date pattern I needed easily by invoking an IS service and using the output as a variable in the file move task.

    Thanks for your suggestion.

    Yunus Aswat.


    #webMethods
    #B2B-Integration
    #Managed-File-Transfer