Skip to main content
Solved

How to read / write a .tar file?


Forum|alt.badge.img

Hello,

Is it possible to read and unzip .tar files?

 

 

I have an interesting project that starts with a .tar file, I need to unzip that to get a .gz file, need to unzip that to get another .tar file, one final unzip to get a folder containing the data I need to edit.

 

So in short the structure:

 

.tar -> unzip -> .gz -> unzip -> .tar -> unzip = folder containing DBF and SHP files I need to edit.

 

Once edits have been made I need to zip everything back up in reverse order.

How would I do this?

 

Thanks, all the best,

 

Ed

Best answer by takashi

Hi @edhere, FME doesn't directly support packing/unpacking with gz and tar format. However, if you install an external command line tool which supports gz and tar, you can embed its functionality to a workspace using the SystemCaller transformer.

Probably 7-Zip is a good tool for your purpose. 7-Zip installation contains a help documentation including how to use it from command line.

View original
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • Best Answer
  • April 12, 2018

Hi @edhere, FME doesn't directly support packing/unpacking with gz and tar format. However, if you install an external command line tool which supports gz and tar, you can embed its functionality to a workspace using the SystemCaller transformer.

Probably 7-Zip is a good tool for your purpose. 7-Zip installation contains a help documentation including how to use it from command line.


takashi
Celebrity

Hi @edhere, FME doesn't directly support packing/unpacking with gz and tar format. However, if you install an external command line tool which supports gz and tar, you can embed its functionality to a workspace using the SystemCaller transformer.

Probably 7-Zip is a good tool for your purpose. 7-Zip installation contains a help documentation including how to use it from command line.

I tested extracting process using 7-Zip and SystemCallers, and it worked fine. Assuming these parameters are defined.

 

  • $(7Z_EXE): The "7z.exe" file path
  • $(SOURCE_TAR): The source "*.tar" file path
  • $(DEST_FOLER): A directory path to which extracted folder will be saved finally.


Forum|alt.badge.img
  • Author
  • April 13, 2018

Thanks @takashi , I'll give it a try.

Best,

 

Ed