suppress console output in script

Advertisement

sixscrews
Donor
Joined:
Posts:
1
Location:
United States

suppress console output in script

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: suppress console output in script

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.

Reply with quote

VJ
Guest

how to suppress a host key entry while downloading file in asp.net

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: how to suppress a host key entry while downloading file in asp.net

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

Reply with quote

Advertisement

You can post new topics in this forum