Cannnot remove remote file

Advertisement

Robert324
Guest

Cannnot remove remote file

Hello,
I am using WinScp net for long time. Now i am developing on new machine and created testing ftp. However for unknow reason this time i cannot remofe file from remote location. Don't know why. There is no error message, but when using RemoveFile method IsSuccess is false

I can download files from this ftp, check whether they exist but if it comes to removeFile method i get false for IsSuccess without any error. What could be a problem here? As i said on diffrent machine this works as well. How to investiaget that?

 Function FileExist(path As String) As Boolean
        Dim result As Boolean
        If session IsNot Nothing Then
            result = session.FileExists(path)
        Else
            result = False
        End If
        Return result
    End Function

If FileExist(path) Then
   Dim removalResult As RemovalOperationResult = session.RemoveFiles(path)             
       If removalResult.IsSuccess = False Then
          result = False
       End If
End If

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,262
Location:
Prague, Czechia

Re: Cannnot remove remote file

Did you really check, that the removalResult.Failures(0).Message is empty?

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

You can post new topics in this forum