How can I transfer files between directories with ftp using SSIS?
I know I can delete and re-upload the file, but is there an easier way?
I want to transfer a file I finished with to an ‘Archive’ folder.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The theoretical answer is you would use the combination of the commands RNFR (rename from)/RNTO (rename to) to rename (move) a file. Within your FTP session, you’d issue a command like
I say theoretical as my testing using the Windows command-line FTP client (system32\ftp.exe) connecting to a z/OS ftp server would result in the client indicating RNFR/RNTO is an
Invalid commandThe windows client does implement a rename method which under the sheets seems to issue RNFR/RNTO.
A simple rename looks like
However, I could not get it to move under a directory
I don’t know if this is a failing of the client implementation or the server (or both). Or, it might just be an insufficient set of permissions for my credentials.
How does this apply to SSIS?
Whatever steps it takes for you to get the rename working in a command line is going to be the same set of commands you’ll want to issue. If you’re using the built-in
FTP Task, you’ll see there is no rename available to you. You may also discover that it’s one of the most blecherous tasks in the toolbox. Instead, I am a strong advocate of either using a command file for the windows FTP client or using the .NET FTP libraryReferences