Change File Name in FTP Sink for deflated zip files

Jay 561 Reputation points
2020-10-05T08:51:54.023+00:00

I have a for each loop which moves many .zip files to another ftp server.

On the Source I have Compression Type ZipDeflate and on the Sink I have a fileName variable which is dynamic: @item().name

Problem with this is it pass across .zip as extension even though files are deflated.

I tried this in dynamic content : replace(@item().name, '.zip', '.txt') but then all files are called: replace(@item().name, '.zip', '.txt')

What's the best way to retain the file names but replace the .zip extension with .txt

Thank you

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,646 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vaibhav Chaudhari 38,921 Reputation points Volunteer Moderator
    2020-10-05T09:18:15.757+00:00

    Could you try below expression

    @replace(item().name,'.zip', '.txt')


    Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.