Get summary log of how many files were copied or failed

Advertisement

labsy
Joined:
Posts:
6
Location:
Slovenia

Get summary log of how many files were copied or failed

Hi,

I am using WinSCP to copy files from different local servers via VPN tunnel to web server (it's web shop catalog). It works fine, but when something goes wrong, it is hard for me to read WinSCP LOG files, particularly how many files were copied successfuly or failed. I get log with full details, multiple rows for each file, and no summary.

Is there any option to get (only) summary, like this or something similar:
Total files compared: 19.834 files
Transferred 148 files
Ignored, already exist: 19.686 files
Errors: 0
My script is run from Windows TASK SCHEDULER:
....
set mylogfile="%scriptdir%log\log-images.log"
set myfilemask=*.jpg;*.jpeg;*.gif;*.png;*.eps;*.jfif;*.tif;*.pdf
set mysource=\\localserver\webcatalog\IMAGES
set mytarget=/srv/web_system/data/import/IMAGES
 
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
  /log=%mylogfile% /loglevel=-1 /logsize=10*10M /ini=nul ^
  /command ^
    "open sftp://webserveruser@11.22.33.44/ -hostkey=""ssh-ed25519 255 sfR49KssEegervwcefZp3z72sfvwxKF8521Lq7MwR7i="" -privatekey=""D:\SOME-SHARE\SYNC\CERTS\priv-rsa-key-20210829-webserveruser.ppk""" ^
    "synchronize remote -filemask=%myfilemask% -criteria=either %mysource% %mytarget%" ^
    "close" ^
    "exit"
....
Thanx for possible ideas.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum