XML Logging for two (or more) sites

Advertisement

ceejayemm
Joined:
Posts:
2

XML Logging for two (or more) sites

WinSCP 5.9.4 on Windows Server 2008 SP2 32 bit

I am running the console version of WinSCP with the following command line:

"C:\Program Files\WinSCP\winscp.com" /ini=C:\ProgFiles\WinSCP\WinSCP.ini /script=E:\EDI_Data\WPM\Scripts\WPMInvoices.ftp /xmllog=downtrans.log

The script file has the following commands:

option batch abort
option confirm off
open "WPM Downloads"
lcd "\\abc.ac.uk\icprj01_wpm\in"
synchronize local -filemask="IMP0184-01_CI*.csv | _vti_cnf/; data_export/"
synchronize local -filemask="IMP0184-01_SI*.csv | _vti_cnf/; data_export/"
synchronize local -filemask="IMP0184-01_*Fees*.csv | _vti_cnf/; data_export/"
synchronize local -filemask="IMP0184-01_SA*.csv | _vti_cnf/; data_export/"
synchronize local -filemask="IMP0184-01_LI*.csv | _vti_cnf/; data_export/"
synchronize local -filemask="IMP0184-01_Sports*.csv | _vti_cnf/; data_export/"
lcd "\\abc.ac.uk\wpmexport"
synchronize local -filemask="IMP0184-01_PR*.csv | _vti_cnf/; data_export/"
open "WPM Online Store DL"
lcd "\\abc.ac.uk\icprj01_wpm\in"
synchronize local -filemask="IMP0184-01_Store*.csv | _vti_cnf/; data_export/"
exit

The XMLLOG function works fine for the first connection to "WPM Downloads" but as soon as it reaches the second site "WPM Online Store DL" then the logging stops although any files to be synchronized do so properly. Output at the DOS command prompt shows:

E:\EDI_Data\WPM\Reports\Invoices>"C:\Program Files\WinSCP\winscp.com" /ini=C:\ProgFiles\WinSCP\WinSCP.ini /script=E:\EDI_Data\WPM\Scripts\WPMInvoices.ftp /xmllog=downtrans.log
batch abort
reconnecttime 120
confirm off
In scripting you should not rely on saved sites, use this command instead:
open ftps://XXXX.education.com/ -rawsettings FtpListAll=0
Connecting to XXXX.education.com:990 ...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Session started.
Active session: [1] WPM Downloads
\\ictsmb.ad.ic.ac.uk\icprj01_wpm\in
Using configured transfer settings different from factory defaults.
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
Comparing...
Local '\\ictsmb.ad.ic.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/'
Nothing to synchronize.
\\abc.ac.uk\wpmexport
Comparing...
Local '\\abc.ac.uk\wpmexport' <= Remote '/'
Nothing to synchronize.
In scripting you should not rely on saved sites, use this command instead:
open ftps://XXXX.education.com/ -rawsettings FtpListAll=0
Connecting to XXXX.education.com:990 ...
TLS connection established. Waiting for welcome message...
Connected
Starting the session...
Session started.
Active session: [2] WPM Online Store DL
\\abc.ac.uk\icprj01_wpm\in
Comparing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/data_export'
Synchronizing...
Local '\\abc.ac.uk\icprj01_wpm\in' <= Remote '/data_export'
IMP0184-01_Store_20170512 | 2 KB | 31.6 KB/s | binary | 100%
IMP0184-01_Store_20170513 | 2 B | 5.9 KB/s | binary | 100%
IMP0184-01_Store_20170514 | 2 B | 3.2 KB/s | binary | 100%
IMP0184-01_Store_20170515 | 2 B | 2.2 KB/s | binary | 100%
IMP0184-01_Store_20170516 | 2 B | 1.6 KB/s | binary | 100%
IMP0184-01_Store_20170517 | 3 KB | 3.2 KB/s | binary | 100%
IMP0184-01_Store_20170518 | 2 B | 2.6 KB/s | binary | 100%


How can I get a full XMLLOG output for the entire script ?

Thanks

Chris

Reply with quote

ceejayemm
Joined:
Posts:
2

Martin - thanks for this pointer. I had to remove the /xmllog= option from the command line and configure an XML Log File location for each site being used in the script using the '!S' pattern option to name the XML log file. This then gave me the separate XML log files I needed for the complete script run.

Thanks for your help.

Chris

Reply with quote

Advertisement

You can post new topics in this forum