Do you have sample vba code that will read the xml log file?
using this ojbect : CreateObject("MSXML2.DOMDocument")
I was suggesting XML logging. Not a plain session logging. We give no guarantees to the format of session log. It can change in any version. It is not to be parsed.
NET is not an option available.
Using the LOG file appears to be the best solution.
ONE question. Can I always expect the log file to have the same layout, especially when it comes to line that has the file names, as in the example below?
> 2020-03-26 13:38:58.255 Script: ls *.zip
. 2020-03-26 13:38:58.255 Listing directory "/".
< 2020-03-26 13:38:58.591 Script: -rwxrwxr-- 0 1981354 Mar 1 7:08:00 2020 FILE.ANT245.MONULIC.DT030120.TM050812.ZIP
< 2020-03-26 13:38:58.591 Script: -rwxrwxr-- 0 222 Mar 1 10:23:00 2020 FILE.ANTB245.DT030120.TM082345.ZIP
> 2020-03-26 13:38:58.591 Script: exit
. 2020-03-26 13:38:58.591 Script: Exit code: 0
I am using Microsoft Access 2016. I believe using scripting will be the best solution. I am using a shell command to run WinSCP.exe.
That does work but I cannot save a list of files from the ls command. If I could save a list of files to a local text file I could read that file and search the file names and dates.
How to use the "ls" command to return a list directory list of files. From that list I will determine just which ONE to download.
OPEN SFTP://xx:xx@Company.site.com/ -hostkey="xxx"
Are you using simple WinSCP scripting or WinSCP .NET assembly?
Show us what you have.
I am using Microsoft Access 2016 to connect to an sftp site. I need to list files in the sftp directory. Check the names in that list and then download a specific file from that list.
Any examples on how to use this in MS Access or through scripting?
I have spent two day trying to code this in MS Access. With no success at all.
I have written a command file to download a file from an sftp site.
It is mainly being able to LIST what files are in the SFTP folder I am unable to do.