GUI works perfect, Script Generation fails

Advertisement

ghostdog920
Joined:
Posts:
1
Location:
USA

GUI works perfect, Script Generation fails

Good morning,

I have been a winscp user for years, but always from the gui. For the first time i am trying to script with it and running into some strange issue. I can successfully connect to a site and download the files via the gui. In the gui, when i do a generate command, and run the script it fails every time. My log file is showing this and i am not sure what to make of it. I am trying to do a secure webdav call. Here is my command file:

  open davs://username:password@files.surescripts.net/

cd /webdav/Formulary/FBS_3_0/
lcd D:\pfmnt\transfers\SureScripts_v10_3\Formulary\Production

get *
exit

The command i am running is:

"C:\Program Files (x86)\WinSCP\WinSCP.exe" /log="D:\pfmnt\transfers\SureScripts_v10_3\FormularyDownloadLogs\WinSCP.log" /ini=nul /script="C:\scripts\WinSCPDownload.txt"

And the output of the log file is:
. 2019-11-27 06:19:40.888 --------------------------------------------------------------------------
. 2019-11-27 06:19:40.888 WinSCP Version 5.15.5 (Build 9925) (OS 10.0.17763 - Windows Server 2019 Datacenter)
. 2019-11-27 06:19:40.888 Configuration: nul
. 2019-11-27 06:19:40.888 Log level: Normal
. 2019-11-27 06:19:40.888 Local account: PF\chris.myers
. 2019-11-27 06:19:40.888 Working directory: C:\
. 2019-11-27 06:19:40.888 Process ID: 1636
. 2019-11-27 06:19:40.888 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe"  /log="D:\pfmnt\transfers\SureScripts_v10_3\FormularyDownloadLogs\WinSCP.log" /ini=nul /script="C:\scripts\WinSCPDownload.txt"
. 2019-11-27 06:19:40.888 Time zone: Current: GMT-5, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/10/2019, DST End: 11/3/2019
. 2019-11-27 06:19:40.919 Login time: Wednesday, November 27, 2019 6:19:40 AM
. 2019-11-27 06:19:40.919 --------------------------------------------------------------------------
. 2019-11-27 06:19:40.919 Script: Retrospectively logging previous script records:
> 2019-11-27 06:19:40.919 Script: open davs://username:***@files.surescripts.net/
. 2019-11-27 06:19:40.919 --------------------------------------------------------------------------
. 2019-11-27 06:19:40.919 Session name: username@files.surescripts.net (Ad-Hoc site)
. 2019-11-27 06:19:40.919 Host name: files.surescripts.net (Port: 443)
. 2019-11-27 06:19:40.919 User name: username (Password: Yes, Key file: No, Passphrase: No)
. 2019-11-27 06:19:40.919 Transfer Protocol: WebDAV
. 2019-11-27 06:19:40.919 Proxy: None
. 2019-11-27 06:19:40.919 HTTPS: Yes [Client certificate: No]
. 2019-11-27 06:19:40.919 TLS/SSL versions: TLSv1.0-TLSv1.2
. 2019-11-27 06:19:40.919 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2019-11-27 06:19:40.919 Cache directory changes: Yes, Permanent: Yes
. 2019-11-27 06:19:40.919 Recycle bin: Delete to: No, Overwritten to: No, Bin path: 
. 2019-11-27 06:19:40.919 DST mode: Unix
. 2019-11-27 06:19:40.919 Compression: No
. 2019-11-27 06:19:40.919 --------------------------------------------------------------------------
. 2019-11-27 06:19:40.920 HTTP session to https://files.surescripts.net:443 begins.
. 2019-11-27 06:19:41.014 ssl: SNI enabled by default.
. 2019-11-27 06:19:41.015 ah_create, for WWW-Authenticate
. 2019-11-27 06:19:41.015 Sending request headers:
. 2019-11-27 06:19:41.015 OPTIONS / HTTP/1.1

. 2019-11-27 06:19:41.015 User-Agent: WinSCP/5.15.5 neon/0.30.2

. 2019-11-27 06:19:41.015 Keep-Alive: 

. 2019-11-27 06:19:41.015 Connection: TE, Keep-Alive

. 2019-11-27 06:19:41.015 TE: trailers

. 2019-11-27 06:19:41.015 Host: files.surescripts.net
. 2019-11-27 06:19:41.015 Sending request-line and headers:
. 2019-11-27 06:19:41.015 Doing DNS lookup on files.surescripts.net...
. 2019-11-27 06:19:41.075 req: Connecting to 69.25.46.32:443
. 2019-11-27 06:19:41.083 Doing SSL negotiation.
. 2019-11-27 06:19:41.127 Identity match for 'files.surescripts.net': good
. 2019-11-27 06:19:41.127 Verifying certificate for "Operations, SureScripts, LLC, Arlington, Virginia, US" with fingerprint 3a:c4:9f:73:ff:ff:ec:8b:50:dc:d0:45:9d:a0:d5:82:71:b1:f4:c1 and 08 failures
. 2019-11-27 06:19:41.150 Certificate verified against Windows certificate store
. 2019-11-27 06:19:41.150 Using TLSv1.2, cipher TLSv1/SSLv3: ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
. 2019-11-27 06:19:41.150 Request sent; retry is 0.
. 2019-11-27 06:19:41.159 [status-line] < HTTP/1.1 404 Not Found
. 2019-11-27 06:19:41.159 Header Name: [content-length], Value: [0]
. 2019-11-27 06:19:41.159 Header Name: [date], Value: [Wed, 27 Nov 2019 11:19:40 GMT]
. 2019-11-27 06:19:41.159 Header Name: [server], Value: [Surescripts]
. 2019-11-27 06:19:41.159 End of headers.
. 2019-11-27 06:19:41.159 ah_post_send (#0), code is 404 (want 401), WWW-Authenticate is (none)
. 2019-11-27 06:19:41.159 Request ends, status 404 class 4xx, error line:
. 2019-11-27 06:19:41.159 404 Not Found
. 2019-11-27 06:19:41.159 Request ends.
. 2019-11-27 06:19:41.160 sess: Destroying session.
. 2019-11-27 06:19:41.160 sess: Closing connection.
. 2019-11-27 06:19:41.160 sess: Connection closed.

Reply with quote

Advertisement

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

Re: GUI works perfect, Script Generation fails

Your server root is probably not accessible by WebDAV. You probably need to start directly in the /webdav folder -- WinSCP GUI cannot know that.

Try:
open davs://username:password@files.surescripts.net/webdav/

Or straight away in the source folder (and you won't need the cd command):
open davs://username:password@files.surescripts.net/webdav/Formulary/FBS_3_0/

Reply with quote

Advertisement

You can post new topics in this forum