Skip to main content
Solved

Upload multiple pdf files to ftp site?


vxn43
Supporter
Forum|alt.badge.img+18

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?

Best answer by vxn43

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)

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

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • October 16, 2023

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


vxn43
Supporter
Forum|alt.badge.img+18
  • Author
  • Supporter
  • Best Answer
  • October 20, 2023

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)


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