Topic "Upload Validation with Access VBA"

Author Message
johnd2202
[View user's profile]

Joined: 2016-09-20
Posts: 1
Location: North Carolina
Hi all,

So we have successfully uploading a file using MS Access VBA and WinSCP. The issue is that we want to be able to validate that the file processed correctly in the Unix server. There are two other folders on the server, one called errored and one called completed. When the file is processed, it will be moved to one of those folders depending on whether the server application successfully processed it or not. Is there a way through WinSCP scripting to be able to view the folder contents in Access using VBA? Or any other way of validation for that matter?

I'm a noob when it comes to this so any help is greatly appreciated.

Thanks,

John
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
You can use the ls command and XML logging and parse the XML log.
https://winscp.net/eng/docs/logging_xml

More hackish approach would be to just redirect winscp.com output (with the ls output) to a text file and parse that.

The most reliable approach is using the the WinSCP .NET assembly and its Session.ListDirectory method from VBA.
https://winscp.net/eng/docs/library_vb
On the other hand, this requires registration of the assembly, what complicates distribution of the code (if that's required).
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License