Posted Thu, 10 Dec 2020 04:16:06 GMT by

I need to move over a set of files from a local directory to an FTP folder with the corresponding name.  What's the best way to write this?

Posted Tue, 15 Dec 2020 09:04:57 GMT by

Hello,

You can loop the dataset where the original files reside and create a dataset. Within the loop you will create a dataset, you can use theDataset.Name to add the name of the file on the FTP upload step. This will allow you to upload one file at a time with its own name within the loop. Below is a lilttle sample I build. 

<AMLOOP ACTIVITY="folder" FOLDER="C:\Folder" RESULTDATASET="TheDataset" />
<AMFTP ACTIVITY="upload" SERVER="FTPsite.com" USERNAME="user" PASSWORD="AM5VjZOgCix9qa+Z1cSdIqgMQ==aME" SOURCE="%theDataset.Name%" DEST="/home/ftp/%theDataset.Name%" THREADS="1" />
<AMLOOP ACTIVITY="end" />

 

Posted Wed, 16 Dec 2020 06:38:35 GMT by

Thank you.  I was able to get that far but on each file needs to be uploaded to different folders on the FTP.  For example, the file name consist of the word "Visit" and it needs to be uploaded to a folder called "Visit".  There are various different file names with corresponding folders. 

You must be signed in to post in this forum.