Check if any files were transferred

Advertisement

knockando
Joined:
Posts:
14

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

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum