Using Microsoft Access to connect to an sftp site, list files in directory, download file from that.
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.
Thank you
Russ
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"
ls *.zip
exit
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?
Thank you
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.