Transfer Properties (Size and Timestamp)

Advertisement

Xeix
Joined:
Posts:
2
Location:
Barcelona(Spain)

Transfer Properties (Size and Timestamp)

Hi,

In a PowerShell script I would be interested to get the size and timestamp of the transferred file, in that moment I have the name.
$transferResult = $session.GetFiles($remotePath, $localPath, $False, $transferOptions)
   
        foreach ($transfer in $transferResult.Transfers)
        {
            if ($transfer.Error -eq $Null)
            {
                $session.MoveFile($transfer.FileName,$Nou)
                Write-Host "Upload of $($transfer.FileName) succeeded, moving to backup " +  $transfer.FileName + ' Date: ' + [b]$transfer.xxxxxx[/b] + ' Size: ' + [b]$transfer.Size[/b]

Is possible? In the Log file they are:
. 2018-11-20 14:02:52.866 Preserving timestamp [2018-10-24T08:07:19.000Z]
. 2018-11-20 14:02:52.882 Transfer done: '/inbox/File.pdf' => '\\server01\G25277203\File.pdf' [150661]

Many thanks in advance,
Xavier Caros

Reply with quote

Advertisement

Xeix
Joined:
Posts:
2
Location:
Barcelona(Spain)

Thanks a lot Martin, I've been torturing google :-) and I was already seeing that I had to change my strategy

Reply with quote

Advertisement

You can post new topics in this forum