<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=612681139262614&amp;ev=PageView&amp;noscript=1">
Skip to content

Need help? Talk to an expert: phone(904) 638-5743

Moving Files Between Folders in Your FTP Server 

Moving Files Between Folders in Your FTP Server 

PRAG_1200x628_FBad-1.pngDownloading? Simple. Uploading? A cinch. Moving files between folders? Easy enough when I’m looking at it on the server, but what about making it a part of your ETL? Or say you want to find a way to automate the process? Chances are, this may be an issue for even a seasoned SSIS developer, but thanks to some new functionality within Task Factory, the entire process is now easier than ever.

To get started, all we need is version 2017.1.3 of Task Factory (or newer), a Secure FTP Task in our control flow, a connection manager targeting our Secure FTP server, and a few files to move around. In this demo, I will show you just how easy it is.

  • For this demo, I will move 3 text files from one folder to another in the Pragmatic Works FTP.
  • First, I’ll open my first secure FTP task and I make sure to select “Get a list of files with metadata”.
  • I’ve already got my connection manager set up, the directory where the files are located and I’m filtering specifically for text files.
  • I will be storing the result of the list in a user defined variable object.
  • Next, I drag over a For Each loop container (which I do because I have 3 files to iterate through) and another secure FTP task.
  • Open the For Each loop container and go down to the collection tab. I then choose the enumerator and the object variable that I’m going to be utilizing.
  • Then I choose the SSIS variables to map, which can be created before creating the For Each loop or it can be set up in Variable Mappings.
  • The final step is to select my second FTP task. Once I set up and configure my connection manager, as I did with the previous FPT task, I choose the Rename File option.
  • I also check off “Stop Package at Failure” to ensure this goes off without a hitch.
  • Simple; the set-up is done. I execute and my files have all moved over.

And that’s it! Renaming a file is a powerful tool, especially when we can actively rename the file path too. But this only scratches the surface of what we can accomplish with Task Factory. Explore our available Task Factory courses and begin amplifying your SSIS!

Sign-up now and get instant access

Leave a comment

Free Trial

On-demand learning

Most Recent

private training

Hackathons, enterprise training, virtual monitoring