This is kind a odd requirement because if your client doesn’t want the old file to be overwritten then you could simply append the timestamp to the file name. Anyhow you can work around this requirement in few ways:
1 - You can use repository to store a value like 01 or 02 and everytime you are about to write the file on FTP server just pull that value increament it by one and overwrite it in the repository. Then you can append that to the file name.
2- You can do the same thing but store the value in database and overwrite for each file after incrementing.
3- If your client is keeping the file in the same directory then you can always get the list of files and tokenize it to get the last numbers and use the to create new file name.
I am sure there are other/better ways to do it. These are just on top of my head right now.
#Universal-Messaging-Broker#Integration-Server-and-ESB#broker#webMethods