Topic "Using Session.FileExists() function throws "Session Failed" error"

Author Message
George A.


When I try to check if file exists at FTP site with Session.FileExists() function it fires up Session.Failed event when file is not there. The message is "Can't get attributes of file .... No such file or directory. Error code: 2. Error message from server: File not found."
Is there a way to void this message? I read documentation and found nothing about it.

thank you.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
Thanks for your post.

This issue has been added to the tracker:

Meanwhile, just ignore calls to the Session.Failed, when you are calling the Session.FileExists. Just introduce some flag.
George A.


Thank you sir.

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License