Topic "Skip when encountering error"

Author Message
Joshuas

Guest


I have a script and it will be encountering an error two times which is expected... all having to do with ssh directories that dont want to be filtered out with filemasks. Is there a way to automatically have it skip directories when it encounters an error?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Quote:
that dont want to be filtered out with filemasks

What does this mean?
_________________
Martin Prikryl
Joshuas

Guest


Its hard to respond without going into a learge spheal, but basically there are .ssh directories on the sftp for all clients who wish to use .ssh to send files...

Synchronize -preservetime -nopermissions -filemask="*.xls;*csv;*.pgp;*.xlsx;*.txt;*gpg|lost+found/" local "Z:\Shared\NEW Egnyte\Staging" "/mntSFTP/sftpRoot/"

The errors are permission errors when the script reaches certain directories. I can get it to filter out the lost+found, but not the other two. The above sample does not include the attempts to filter out the other directories.. I just want to know If I can have it automatically enter S when encountering Error Code 3. Everything was fine and automated until clients wanted to use ssh keys as opposed to passwords.. Ideally I want it to skip the .ssh directories but if not then autoskipping errors would serve the same purpose and make life easier.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You can use option batch continue. But that affects for any error and is generally not recommendable.

You didn't explain though what is a problem about excluding the other folders using mask.
_________________
Martin Prikryl
Guest




Perhaps it is my syntax, I added one filemask to disclude lost and found that worked and when I added more I was unsuccessful and continued to receive an error. Can you show me the proper syntax to have multiple exclusions. I already have 8 extensions for inclusions that work fine.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
-filemask="*.xls;*csv;*.pgp;*.xlsx;*.txt;*gpg|lost+found/;anotherdirectory/;yetanotherone/"
Joshuazzzzz

Guest


Ur awesome that last response actually helped me see where the error was in my script. All works fine now.
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