Topic "Cannnot remove remote file"

Author Message
Robert324

Guest


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?

Code:
 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



martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26514
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License