Unable to remove file using session.RemoveFiles (VB.Net)
Dim sessionOptions As New SessionOptions With sessionOptions .Protocol = Protocol.Ftp .HostName = "192.168.0.3" .UserName = ftp_username .Password = ftp_password End With Using session As New WinSCP.Session session.Open(sessionOptions) Dim result = session.RemoveFiles("/app/log.txt") For Each x In result.Failures Debug.Print(x.ToString()) Next Debug.Print(result.IsSuccess) End Using
Here is output:
If I doWinSCP.SessionRemoteException: Can't get attributes of file '/app/log.txt'.
Could not retrieve file information
Unknow command
False
session.RemoveFiles("/app/*.txt")
Please Help.