Manipulating file renames

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?

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

1 Like

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.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.