Check status of each file transfer

Advertisement

yun
Joined:
Posts:
1

Check status of each file transfer

Hi,

I know there are a lot of posts about file move after success of file transfers. But, I noticed there are rather old code (example below).

Example from https://winscp.net/eng/docs/script_local_move_after_successful_upload:
# Iterate over every transfer
foreach ($transfer in $transferResult.Transfers)
{
    # Success or error?
    if ($transfer.Error -eq $Null)
The newer code that checks transfer status looks like ending the whole this
transferResult.Check() looks like an overall error check and I do not wanted this because at the end I don't know which files are actually successfully transferred and need to restart from beginning – it become disaster when the directory hold large number of files.
Advice needed. Thanks

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Check status of each file transfer

It's not newer vs. older code. Both approaches are valid (and always were). It is your choice, what you want to check for.

Reply with quote

Advertisement

You can post new topics in this forum