Topic "How to ignore SessionRemoteException"

Author Message
Guest




Hi,

I have a script in powershell to synchronize to server but i receive this error :
Code:
WinSCP.SessionRemoteException: Error listing directory '/System Volume Information'. ---> WinSCP.SessionRemoteException: Permission denied.
Error code: 3
Error message from server: Permission denied
   --- End of inner exception stack trace ---


Is it possible to ignore this type of error and continue to other directory ?

Thanks Regards
Stephane
Advertisements
Stephane Tinseau
[View user's profile]

Joined: 2014-06-18
Posts: 7
Location: Paris
Hi,

I have successfully ignore this folder with adding the folder name in FileMask options parameter.

Code:

$transferOptions.FileMask = "|*.log; *.7z; *.zip; *.ric; *.pag; */System Volume Information/; */`$RECYCLE.BIN/"


But the issue still present with this other error

Code:

(f);WinSCP.SessionRemoteException: Terminated by user. ---> WinSCP.SessionRemoteException: Error listing directory '/dir1/dir2/file1'.
Error deleting file '/dir1/dir2/file1'.
   --- End of inner exception stack trace ---


I think it's again a permission issue but i can't manage all of them.
So the first question is still available:
How to catch these error without stop the copy.

Thanks
Regards
Stephane
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
There's no way to ignore "all errors".
_________________
Martin Prikryl
Stephane Tinseau
[View user's profile]

Joined: 2014-06-18
Posts: 7
Location: Paris
Ok,

But in this case, how to ignore the delete error ?

Thanks
Regards
Stephane
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I'm not sure about a cause of the error. Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate 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 Site

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