Skip to main content

How would I configure ftp caller to upload multiple PDF files to an ftp site?

I tried Transfer Type - Upload a File and used a wildcard in the path, *.pdf, but this was rejected.

 

I know how to use FTPCaller to upload a single file. I have included a screenshot of the FTPCaller parameters I chose but these result in a rejection.

 

I want to upload all ftp files in a particular folder to my ftp site.

 

If FTPCaller cannot upload "all pdf files in a particular folder", what other transformer should I use?

You're correct that the FTPCaller will only upload explicity specified files, so therefore you need to process each file individually. This is how i'd do it:

  1. Read in all PDFs (using the 'Directory and File Pathname' reader)
  2. Run any checks/process needed
  3. Pass each feature (with the path to the pdf) to the FTPCaller. If you read in 20 pdfs, you run the FTPCaller 20 times

You might be able to build a list of the pdf paths and do it in fewer calls, but not 100% on what the syntax for that would be


I found that since I am using the PATH reader features as input, if I use the path_filename attribute in the FTPCaller's URL and File to Upload parameters, I am able to upload a single file to the FTP site without having to specify the file name or extension. Here is an example of what a user would add ftp://<ftpServer>/<folder>/@Value(path_filename)

 

This gets me what I needed.

(thank you @hkingsbury for steering me in the right direction)


Reply