Skip to main content
Solved

How to extract .zip files downloaded by HttpCaller?

  • July 31, 2018
  • 9 replies
  • 213 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

I´m using this comand:

cd / "C:\\Program Files (x86)\\WinRAR\\Rar.exe" x-y "@Value(_response_file_path)"

The file is downloaded correctly but the unzip process don´t work properly.

Thank´s

Best answer by redgeographics

The SystemCaller would be the transformer to use for that.

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.

9 replies

danilo_fme
Celebrity
Forum|alt.badge.img+52
  • Celebrity
  • July 31, 2018

Hi @mr_fme

I think you can use the custom transformer ZipExtractor after the HttpCaller.

Thanks,

Danilo


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • July 31, 2018

Hi @mr_fme

I think you can use the custom transformer ZipExtractor after the HttpCaller.

Thanks,

Danilo

Unfortunately not! I´m using 2017 version. This transformer crash my workbench. I need to use command line.

 

 


redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • July 31, 2018

The SystemCaller would be the transformer to use for that.


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • July 31, 2018

The SystemCaller would be the transformer to use for that.

Correct!! But I need the correct command line

 

 


redgeographics
Celebrity
Forum|alt.badge.img+62
Correct!! But I need the correct command line

 

 

Does that command line you posted work ok if you run it directly in cmd?

 

 

I'd try it without the cd /, I think the SystemCaller tries to execute the whole thing as a single command.

 

 


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • July 31, 2018
Does that command line you posted work ok if you run it directly in cmd?

 

 

I'd try it without the cd /, I think the SystemCaller tries to execute the whole thing as a single command.

 

 

This command run properly in CMD but not in FME:

 

 

cd C:\\Program Files (x86)\\WinRAR\\winrar x C:\\Users\\FME\\Desktop\\test_file.zip c:\\test

 

 


takashi
Celebrity
  • July 31, 2018
This command run properly in CMD but not in FME:

 

 

cd C:\Program Files (x86)\WinRAR\winrar x C:\Users\FME\Desktop\test_file.zip c:\test

 

 

I don't think so.

 

  • The leading "cd" is not necessary.
  • The file path should be quoted since the path contains spaces.
This command line should work with cmd.

 

"C:\Program Files (x86)\WinRAR\winrar" x C:\Users\FME\Desktop\test_file.zip c:\test
Also, when you execute the command line via the SystemCaller, you will have to quote the entire command line if a file path within it contains spaces.
""C:\Program Files (x86)\WinRAR\winrar" x C:\Users\FME\Desktop\test_file.zip c:\test"

 


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • August 1, 2018
I don't think so.

 

  • The leading "cd" is not necessary.
  • The file path should be quoted since the path contains spaces.
This command line should work with cmd.

 

"C:\Program Files (x86)\WinRAR\winrar" x C:\Users\FME\Desktop\test_file.zip c:\test
Also, when you execute the command line via the SystemCaller, you will have to quote the entire command line if a file path within it contains spaces.
""C:\Program Files (x86)\WinRAR\winrar" x C:\Users\FME\Desktop\test_file.zip c:\test"

 

Hi @takashi

 

 

Thank´s, work properly now!! I was missing something very silly for what I saw.

 

 

 


takashi
Celebrity
  • August 1, 2018
Unfortunately not! I´m using 2017 version. This transformer crash my workbench. I need to use command line.

 

 

The ZipExtractor should work in FME 2015.1.3.2+. If a translation has crashed causing by some issue in the transformer, I would have to fix it. Could you please post the log file logged when the translation crashed?