Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

knockando

Check if any files were transferred

My script is running the following get cmd, it runs fine everytime.

get /agc/*.txt D:\TransferHolding\

What is the best way to know if any files were retrieved? I want to do some logging for my end users and right now it logs the transfer was completed even if no files were found in the remote dir (/agc/). I'm already checking the exitcode which behaves as expected and returns success if no files were transferred.

Dim rStatus As Boolean = (winscp.ExitCode = 0)
If rStatus Then
'Success
Else
'Error
End If