Topic "Check if any files were transferred"

Author Message
knockando
[View user's profile]

Joined: 2010-11-04
Posts: 14
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Please read documentation:
http://winscp.net/eng/docs/guide_automation#results
_________________
Martin Prikryl
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