Question

FTP CALLER How to use the transformer to list all .zip on sftp and download

  • 10 September 2017
  • 12 replies
  • 54 views

Badge

@Andrew.griffin@gmail.com


12 replies

Userlevel 4
Badge +30

Hi @andrewegriffin,

I created a Workspace using two transformers FTPCaller:

  • First :to get the name all files in ftp.
  • Second: to do download all files with (.zip ).

During the Workspace i worked with the attribute generated by first FTPCaller to split and search using REGEX the words .zip.

Attached the workspace template.

Thanks,

Danilo

Badge +4

Hi,

I would be interested in the solution, but your sample is not the one in the screenshot above.

Userlevel 4
Badge +30

Hi,

I would be interested in the solution, but your sample is not the one in the screenshot above.

Hi @arxit,

 

I'm sorry.

 

Now is the right Workspace.

 

 

Thanks, - workspace-ftp.fmwt

 

Danilo

 

Badge

is there a way to add sub-folders to this process?

Badge +2

is there a way to add sub-folders to this process?

Hi @brianapeters. Thanks for your question. I think it might be a good idea to post your question as a separate new question, as this thread is a bit old. A new question will get better exposure, and more likely to be answered quickly.

Also, in your new question, could you please clarify, by "add sub-folders to this process", do you mean how to handle zip files on sftp that contains subfolders? A bit more detail regarding your specific scenario will be helpful. Cheers,

Badge

Hi @andrewegriffin,

I created a Workspace using two transformers FTPCaller:

  • First :to get the name all files in ftp.
  • Second: to do download all files with (.zip ).

During the Workspace i worked with the attribute generated by first FTPCaller to split and search using REGEX the words .zip.

Attached the workspace template.

Thanks,

Danilo

Thanks for sharing @danilo_fme

The .fmw project no longer seems to be attached. You wouldn't happen to have this would you?

Userlevel 2
Badge +14

The .fmw project no longer seems to be attached. You wouldn't happen to have this would you?

Hi @sxwebster​,

 

Thank you for reporting the missing attachment. I've fixed the original link as well as attached the workspace to this comment.

@danilo_fme​  Thanks a million, this was very helpful for me. One note though for anyone who is having issues with the downloads not happening in the second FTP Caller. The @Value(files_zip) must also be appended to the FTP Callers URL parameter or else the downloaded file will simply be a directory listing from the ftp server. The  URL in this example would be:

ftp://ftp.safe.com/outgoing/@Value(files_zip)

 

Userlevel 4
Badge +30

@danilo_fme​  Thanks a million, this was very helpful for me. One note though for anyone who is having issues with the downloads not happening in the second FTP Caller. The @Value(files_zip) must also be appended to the FTP Callers URL parameter or else the downloaded file will simply be a directory listing from the ftp server. The  URL in this example would be:

ftp://ftp.safe.com/outgoing/@Value(files_zip)

 

Thanks @boneill81​ for your feedback.

Badge

Thanks for providing a workspace, I was able to download the compressed file however there seems to be a problem with the file itself after it was downloaded using FME. No issues downloading the same file manually using FileZilla.

 

This is from an SFTP site and the only thing I've changed on the FTP Caller was the Authentication Parameters.

 

Not sure if it's relevant, but the ZIP has 5 folders and each folder has a subfolder to each shapefiles.image

Badge +1

@danilo_fme​  Thanks a million, this was very helpful for me. One note though for anyone who is having issues with the downloads not happening in the second FTP Caller. The @Value(files_zip) must also be appended to the FTP Callers URL parameter or else the downloaded file will simply be a directory listing from the ftp server. The  URL in this example would be:

ftp://ftp.safe.com/outgoing/@Value(files_zip)

 

I was banging my head on the desk. This would be great documentation addition. 😕 

Reply