Skip to main content
Level 2
Sep 16, 2020 9:36 PM UTC
Solved

Can anyone share an example of how to unzip/decompress a file in a workflow?

I saw this question and attempted to test the same but unfortunately couldn't get it to work with either a zip or gz. my js ended up looking like:

 

var cmdStr="unzip -j /folder/folder/folder/tester.zip -d folder/folder/folder";

var res=execCommand(cmdStr);

 

i also read elsewhere that decompressing a file is possible in the data loading activity, by choosing 'pre-process the file' then inputting gunzip -c <%= vars.sourceFile %>

again couldn't get this to work

 

lastly i tried gunzip in a js activity, code was like:

 

execCommand('cd /folder/folder/folder \n gunzip "tester.csv.gz" ');

 

but again couldn't get it to work. am sure i am doing something basic wrong but error message just says error while evaluating so not sure what.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
stephenjwzAccepted solution
Level 2
Sep 24, 2020 8:52 AM UTC

turns out it was just an issue with our configuration that prevented me seeing the decompress/decrypt dropdown on the data loading activity - all sorted now

3 replies

DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 17, 2020 2:42 AM UTC

script looks fine.

Can you check if you are authorized to run execCommand on ACC?

Thanks,

David

Translate
David Kangni
Level 2
Sep 17, 2020 3:36 PM UTC
gave myself "PROGRAM EXECUTION" Named right; "Right to execute external programs" but still the same outcome
Translate
stephenjwzAuthorAccepted solution
Level 2
Sep 24, 2020 8:52 AM UTC

turns out it was just an issue with our configuration that prevented me seeing the decompress/decrypt dropdown on the data loading activity - all sorted now

Translate