FTPWebrequest.RenameTo property usage

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Has anyone seen a sample using this property. I'm trying to rename a file on
an FTP site and I'm getting an access error.

"The remote server returned an error: (550) File unavailable (e.g., file not
found, no access)."

The connection is ok. If I change to the GetDateTimestamp method the file
is found correctly....

Code Snippet:

objRequest.Method = WebRequestMethods.Ftp.Rename

'objRequest.Method = WebRequestMethods.Ftp.GetDateTimestamp

objRequest.RenameTo = strNewFileName

Dim objResponse As FtpWebResponse = CType(objRequest.GetResponse(),
FtpWebResponse)
 
Back
Top