# Use 7 zip from system.util.execute

**URL:** <https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370>\
**Category:** Ignition\
**Created:** [March 24, 2020, 5:40pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370 "2020-03-24T17:40:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [March 24, 2020, 5:40pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370/1 "2020-03-24T17:40:56Z")

</div>

Is it possible to use 7 zip from the system.util.execute function? I have been trying, but cannot seem to figure out what parameters need to be sent in the list. I can do it from the windows command window just fine.

> system.util.execute(["C:\\Program Files\\7-Zip\\7z.exe","e c:\\gzTest\\zippedFile.gz -so \> c:\\gzTest\\unzippedFile.csv -aoa"])

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 24, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370/2 "2020-03-24T17:52:57Z")

</div>

Try each space-delimited option as a separate element in the list:  
`system.util.execute(["C:/Program Files/7-Zip/7z.exe", "e", "C:/gzTest/zippedFile.gz", "-so", ">", "C:/gzTest/unzippedFile.csv", "-aoa"])`

Also, I’m _pretty_ sure you can just use forward-slashes and not have to worry about Windows paths, although system.util.execute may be an exception to that.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [March 24, 2020, 6:00pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370/3 "2020-03-24T18:00:06Z")

</div>

That did not seem to work either. What I was able to get to work was to make a bat script and then call the bat script from system.util.execute.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 24, 2020, 9:00pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370/4 "2020-03-24T21:00:13Z")

</div>

Java has built-in zip and gzip support–no need to launch an external process.

[https://docs.oracle.com/javase/8/docs/api/java/util/zip/package-summary.html](https://docs.oracle.com/javase/8/docs/api/java/util/zip/package-summary.html)

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://forum.inductiveautomation.com/u/Jonathan)\
**Post date:** [March 24, 2020, 9:21pm UTC](https://forum.inductiveautomation.com/t/use-7-zip-from-system-util-execute/33370/5 "2020-03-24T21:21:58Z")

</div>

I was using gzip but it was to memory and cpu intensive for the big files I am working with. It would cause the gateway to slow down and disconnect. Using the operating system seems much faster.
