1

How to move files from FTP folder to another sub directory folder.

E.g:

My FTP file path from "ftp://3.111.123.001/ftproot/Incoming/Test.xml"

I would like to move "ftp://3.111.123.001/ftproot/Incoming/Test.xml" file to below path: "ftp://3.111.123.001/ftproot/Incoming/Processed/Test.xml"

How to do. Please help me to solve.

dhamo
  • 181
  • 5
  • 14
  • 2
    Possible duplicate of [How can I use FTP to move files between directories?](http://stackoverflow.com/questions/4864925/how-can-i-use-ftp-to-move-files-between-directories) – Raktim Biswas Jun 13 '16 at 07:05
  • Uri serverFile = new Uri("ftp://3.211.211.001/ftproot/Incomming/ProcessedFiles/ITEM_2016-06-13T02_06_34.200-04_00.xml"); FtpWebRequest reqFTP= (FtpWebRequest)FtpWebRequest.Create(serverFile); reqFTP.Method = WebRequestMethods.Ftp.Rename; reqFTP.Credentials = new NetworkCredential("ftpuser", "test"); reqFTP.RenameTo = "ftp://3.211.211.001/ftproot/Incomming/ProcessedFiles/Test"; FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); – dhamo Jun 13 '16 at 09:29
  • I am getting below error: – dhamo Jun 13 '16 at 09:30
  • An unhandled exception of type 'System.Net.WebException' occurred in System.dll Additional information: The remote server returned an error: (550) File unavailable (e.g., file not found, no access). – dhamo Jun 13 '16 at 09:30

0 Answers0