Here is the code
FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create("ftp://xxx.xxx.xx//Versions/" + (isStable ? "S1.noext" : "T1.noext")); ftp.Proxy = null; ftp.Credentials = new NetworkCredential("login", "password"); ftp.Method = WebRequestMethods.Ftp.Rename; ftp.RenameTo = "Test.noext"; WebResponse disp = ftp.GetResponse(); disp.Close(); If the first time it is run on one file, the file is successfully renamed, and if it is run a second time on another file in the same directory, an error will pop up in GetResponse:
The remote server returned an error: (550) The file is not available (for example, it was not found or it cannot be accessed)
I tried to set the URI ( ftp: //xxx.xxx.xx/asd/ and ftp: // xxx: xxx@xxx.xxx.xx/asd/ ) in different ways, nothing happened, the same thing. How to solve this problem?