Customer Portal

Renaming Files with datetime stamp

Comments 3

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Dear Sriram,

    Moving files can be done with MoveFiles component in jobflow. Directory can be named dynamically using parameter, e.g. ${TIMESTAMP} with value `today()` (as a whole, even with the backquotes) This syntax allow you to use CTL1 functions in parameter values.

    If you have any further questions, please let me know.

    Kind regards,
  • Avatar
    kwrosenzweig
    0
    Comment actions Permalink
    How do you add the time stamp to the file name, not the directory?
  • Avatar
    Lukas Cholasta
    0
    Comment actions Permalink
    Hi

    You can add the timestamp to the file name using dynamic parameter, which can hold values dynamically created by CTL2 language. You can use the CTL2 function called today() to get the date and time. However while you want to use it as a part of the file URL, you need to use yet another function called date2str(date, string) in order to get rid of the forbidden characters (space, colons). Please see the attached jobflow and especially the TIMESTAMP parameter, to see how it works.

    Please, keep in mind that if you want to use the File Operations components, you need to own a jobflow license. And if you have any further questions, please let me know.

    Hope this helps.

Please sign in to leave a comment.