community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Zip files

Asteroid

Hi Is there a way, where i can take 2 text file which are static and 2 excel sheets which are going to be built in Alteryx. I was wondering how can i zip the 4 files together using Alteryx before placing the zip file onto an FTP site?

Alteryx Certified Partner

I think the general process should go something like this:

 

- Use Alteryx to save all 4 files in the same folder.

- Use the Run Command tool to execute a batch file that compresses that folder into a zip file.

 

Here's a few articles discussing the use of batch files to zip files/folders:

https://stackoverflow.com/questions/20485419/batch-file-script-to-zip-files

https://stackoverflow.com/questions/17546016/how-can-you-zip-or-unzip-from-the-script-using-only-win...

 

Asteroid

I am trying to set up a run command that runs the 7-zip exe and then run command

 

7z a -tzip file1.xlsx, file2.xlsm

 

But it is coming up with the following error code 

 

Error: Run Command (1): The external program "C:\Program Files (x86)\7-Zip\7z.exe" returned an error code: 7

 

But cant find anything that tells me what the error code is? any ideas?

Alteryx Certified Partner
Alteryx Certified Partner

@AndrewCrayford,

 

It looks like you really want something like:

 

 

7z a -tzip archive.zip file1.xlsx, file2.xlsm

 

Here's a snip of the manual:

 

Adds files to archive.

Examples

7z a -tzip archive.zip subdir\

adds all files and subfolders from folder subdir to archive archive.zip.

7z a -t7z Files.7z *.txt -r

adds all *.txt files from current folder and its subfolders to archive Files.7z.

Switches that can be used with this command

-i (Include)
-m (Method)
-p (Set Password)
-r (Recurse)
-sfx (create SFX)
-si (use StdIn)
-so (use StdOut)
-t (Type of archive)
-u (Update)
-v (Volumes)
-w (Working Dir)
-x (Exclude)

See also

Commands: d (Delete), u (Update)
Switches: -u (Update)

 

http://7zip.bugaco.com/7zip/MANUAL/commands/add.htm

 

Cheers,

Mark

 

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Labels