Topic "suppress console output in script"

Author Message
sixscrews
[View user's profile]
Donor
Joined: 2012-10-04
Posts: 1
Location: United States
Hello WinSCPersons:

I'm running a simple script that uses 'synchronize local' to synchronize a local directory from a remote directory.

The script looks like this:

option batch abort
option confirm off
open sftp://<site> -hostkey="<hostkey>"
option transfer binary

synchronize local

close
end

When the script hits the 'synchronize local' line it spits out a line to the console for each existing file in the pair.

These are of the form:

Local 'D:\<directory>\<sub-directory>\<file_name>' <= Remote '/<directory>/<sub-directory>/<file_name>'


As their are many, many small files (>100k [!-don't ask]) in the remote directory it takes quite a while (hours?) to get to synchronizing any new files.

Is there a switch or parameter that will suppress or skip this console output?

Thanks,

ss/wb

On further investigation, I have a similar script that lists only the (new) files being synchronized, not ALL the files and directories.

It appears that something in the session setup affects the console output when the session is invoked in a script - am I correct?

ss/wb
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
WinSCP does not print that line for every pair. First, it prints it for folders only. And only for folders, where there are some differences. The line is then followed by display of transfer progress for the different files.

Chances are that you are actually synchronizing every file over and over again. Check the log file to verify. For that case please consult
https://winscp.net/eng/docs/faq_synchronize

Let me know.
_________________
Martin Prikryl
VJ

Guest


I want to download files from ftp sites to local folder. Will each ftp sites has hostentry which needs to be checked on the code. If i want to suppress a hostentry for all websites. How to suppress the same using command. Is it possible??

Thanks
VJ
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
VJ wrote:
I want to download files from ftp sites to local folder. Will each ftp sites has hostentry which needs to be checked on the code. If i want to suppress a hostentry for all websites. How to suppress the same using command. Is it possible??

Not sure what you mean by "suppress a hostentry".
Did you red this?
https://winscp.net/eng/docs/scripting#hostkey
https://winscp.net/eng/docs/faq_hostkey
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