club .csv and .txt files in to a single zip file | Community
Skip to main content
LakshmiPravallika
Community Advisor
Community Advisor
July 28, 2022
Solved

club .csv and .txt files in to a single zip file

  • July 28, 2022
  • 3 replies
  • 2051 views

Hi Team,

 

We are generating 2 different files using data extraction activity.
Data extraction 1 will create test_1.csv
Data extraction 2 will create test_2.txt

 

We need to club this test_1.csv and test_2.txt file as a single zip file 'myProject.zip' and need to send to SFTP.

 

 

Kindly help us to achieve this!

Thanks

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

Hi @lakshmipravallika ,

 

Try using below script,
execCommand('zip -r -j /sftp/my/path/myProject.zip /sftp/my/path/test_1.csv /sftp/my/path/test_2.txt');

 

Regards,
ParthaSarathy S

3 replies

Craig_Thonis
Adobe Employee
Adobe Employee
July 28, 2022

Hi Lakshmi,

 

Please take a look at the documentation below and let us know if there are any questions. Do combine and zip both files into a single zip will likely take some scripting.

 

https://experienceleague.adobe.com/docs/campaign-classic/using/getting-started/importing-and-exporting-data/managing-data-encryption-compression/zip-encrypt.html?lang=en

 

LakshmiPravallika
Community Advisor
Community Advisor
July 28, 2022

Hi Thonis,

 

Thanks for providing me the link.But the documentation do not contain the steps to zip the files.

 

It only contain the steps to encrypt the files.

 

This doc doesn't help to achieve my use case of combining 2 files and zipping them into a single file.

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
August 4, 2022

Hi @lakshmipravallika ,

 

Try using below script,
execCommand('zip -r -j /sftp/my/path/myProject.zip /sftp/my/path/test_1.csv /sftp/my/path/test_2.txt');

 

Regards,
ParthaSarathy S

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
LakshmiPravallika
Community Advisor
Community Advisor
August 4, 2022

Hi @parthasarathy ,

 

It is working.