Skip to main content
Solved

How to extract .zip files downloaded by HttpCaller?


mr_fme
Enthusiast
Forum|alt.badge.img+8

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.

View original
Did this help you find an answer to your question?

9 replies

danilo_fme
Evangelist
Forum|alt.badge.img+44
  • Evangelist
  • 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+8
  • Author
  • Enthusiast
  • July 31, 2018
danilo_fme wrote:

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+49
  • Celebrity
  • Best Answer
  • July 31, 2018

The SystemCaller would be the transformer to use for that.


mr_fme
Enthusiast
Forum|alt.badge.img+8
  • Author
  • Enthusiast
  • July 31, 2018
redgeographics wrote:

The SystemCaller would be the transformer to use for that.

Correct!! But I need the correct command line

 

 


redgeographics
Celebrity
Forum|alt.badge.img+49
mr_fme wrote:
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+8
  • Author
  • Enthusiast
  • July 31, 2018
redgeographics wrote:
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
Influencer
  • July 31, 2018
mr_fme wrote:
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+8
  • Author
  • Enthusiast
  • August 1, 2018
takashi wrote:
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
Influencer
  • August 1, 2018
mr_fme wrote:
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?

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings