Download Most Recent File Problem
I'm trying to get this script to run:
https://winscp.net/eng/docs/script_download_most_recent_file
but it says no files available even tho there are a ton. What's weird is that the line:
WScript.Echo(exec.StdOut.ReadAll());
echos out all the files....
Here is how the XML file ends:
2010-01-18 18:16:51.149 Access granted
. 2010-01-18 18:16:51.206 Opened channel for session
. 2010-01-18 18:16:51.260 Started a shell/command
. 2010-01-18 18:16:51.261 --------------------------------------------------------------------------
. 2010-01-18 18:16:51.261 Using SFTP protocol.
. 2010-01-18 18:16:51.262 Doing startup conversation with host.
> 2010-01-18 18:16:51.263 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-01-18 18:16:51.317 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2010-01-18 18:16:51.318 SFTP version 3 negotiated.
. 2010-01-18 18:16:51.318 We believe the server has signed timestamps bug
. 2010-01-18 18:16:51.318 We will use UTF-8 strings for status messages only
. 2010-01-18 18:16:51.318 Getting current directory name.
. 2010-01-18 18:16:51.319 Getting real path for '.'
> 2010-01-18 18:16:51.319 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-01-18 18:16:51.409 Type: SSH_FXP_NAME, Size: 95, Number: 16
. 2010-01-18 18:16:51.409 Real path is '/'
. 2010-01-18 18:16:51.409 Startup conversation with host finished.
. 2010-01-18 18:16:51.410 Listing directory "/download".
> 2010-01-18 18:16:51.410 Type: SSH_FXP_OPENDIR, Size: 35, Number: 267
< 2010-01-18 18:16:52.151 Type: SSH_FXP_HANDLE, Size: 10, Number: 267
> 2010-01-18 18:16:52.151 Type: SSH_FXP_READDIR, Size: 10, Number: 524
< 2010-01-18 18:16:52.367 Type: SSH_FXP_NAME, Size: 5836, Number: 524
> 2010-01-18 18:16:52.367 Type: SSH_FXP_READDIR, Size: 10, Number: 780
< 2010-01-18 18:16:52.421 Type: SSH_FXP_STATUS, Size: 30, Number: 780
< 2010-01-18 18:16:52.421 Status/error code: 1
> 2010-01-18 18:16:52.421 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
. 2010-01-18 18:16:52.425 Closing connection.
. 2010-01-18 18:16:52.425 Sending special code: 12
. 2010-01-18 18:16:52.425 Sent EOF message
https://winscp.net/eng/docs/script_download_most_recent_file
but it says no files available even tho there are a ton. What's weird is that the line:
WScript.Echo(exec.StdOut.ReadAll());
echos out all the files....
Here is how the XML file ends:
2010-01-18 18:16:51.149 Access granted
. 2010-01-18 18:16:51.206 Opened channel for session
. 2010-01-18 18:16:51.260 Started a shell/command
. 2010-01-18 18:16:51.261 --------------------------------------------------------------------------
. 2010-01-18 18:16:51.261 Using SFTP protocol.
. 2010-01-18 18:16:51.262 Doing startup conversation with host.
> 2010-01-18 18:16:51.263 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2010-01-18 18:16:51.317 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2010-01-18 18:16:51.318 SFTP version 3 negotiated.
. 2010-01-18 18:16:51.318 We believe the server has signed timestamps bug
. 2010-01-18 18:16:51.318 We will use UTF-8 strings for status messages only
. 2010-01-18 18:16:51.318 Getting current directory name.
. 2010-01-18 18:16:51.319 Getting real path for '.'
> 2010-01-18 18:16:51.319 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2010-01-18 18:16:51.409 Type: SSH_FXP_NAME, Size: 95, Number: 16
. 2010-01-18 18:16:51.409 Real path is '/'
. 2010-01-18 18:16:51.409 Startup conversation with host finished.
. 2010-01-18 18:16:51.410 Listing directory "/download".
> 2010-01-18 18:16:51.410 Type: SSH_FXP_OPENDIR, Size: 35, Number: 267
< 2010-01-18 18:16:52.151 Type: SSH_FXP_HANDLE, Size: 10, Number: 267
> 2010-01-18 18:16:52.151 Type: SSH_FXP_READDIR, Size: 10, Number: 524
< 2010-01-18 18:16:52.367 Type: SSH_FXP_NAME, Size: 5836, Number: 524
> 2010-01-18 18:16:52.367 Type: SSH_FXP_READDIR, Size: 10, Number: 780
< 2010-01-18 18:16:52.421 Type: SSH_FXP_STATUS, Size: 30, Number: 780
< 2010-01-18 18:16:52.421 Status/error code: 1
> 2010-01-18 18:16:52.421 Type: SSH_FXP_CLOSE, Size: 10, Number: 1028
. 2010-01-18 18:16:52.425 Closing connection.
. 2010-01-18 18:16:52.425 Sending special code: 12
. 2010-01-18 18:16:52.425 Sent EOF message