Hi guys,
Been at this for about 5 hours. no results on the web helping...
I am able to rename folders, but not actual files!
exception message is
the remote server returned an error 500 syntax error command unrecognized
Anyone?
Mr D
Been at this for about 5 hours. no results on the web helping...
I am able to rename folders, but not actual files!
VB.NET:
Try
Dim FOLDERrequest As FtpWebRequest = CType(FtpWebRequest.Create("ftp://" + myFtpHost + "/" + txtTarget.Text), FtpWebRequest)
FOLDERrequest.Credentials = New System.Net.NetworkCredential(myFtpUser, myFtpPassword)
FOLDERrequest.Method = WebRequestMethods.Ftp.Rename
FOLDERrequest.KeepAlive = False
FOLDERrequest.UsePassive = True
FOLDERrequest.RenameTo = Trim(txtNewName.Text)
FOLDERrequest.GetResponse()
Catch ex As WebException
Dim response As FtpWebResponse = DirectCast(ex.Response, FtpWebResponse)
If response.StatusCode = FtpStatusCode.ActionNotTakenFileUnavailable Then 'Does not exist
MsgBox(txtTarget.Text + " does not exist.")
End If
msgbox (ex.message)
End Try
exception message is
the remote server returned an error 500 syntax error command unrecognized
Anyone?
Mr D