output from processing

Advertisement

robkof
Joined:
Posts:
1

output from processing

How become output from processing? If something were synchronized, then make something in batch file. Thanx

<run.bat>
WinSCP.com /script=script.txt
if (something were synchronized) start D:\photos\


<script.txt>
open ftp://name:pass@192.168.0.20:22
cd Camera
synchronize local D:\photos\
exit




Can you please help me?

Reply with quote

Advertisement

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

Re: output from processing

You can enable XML logging and parse it:
https://winscp.net/eng/docs/logging_xml

Though easier is to use a WinSCP .NET assembly from a PowerShell script.

$mode = [WinSCP.SynchronizationMode]::Local
$result =
    $session.SynchronizeDirectories($mode, $localPath, $remotePath, $False)
 
# Throw on any error
$result.Check()
 
if ($result.Downloads.Length -ge 0)
{
    Write-Host "Some files were downloaded"
}
else
{
    Write-Host "No files were downloaded"
}

Reply with quote

Advertisement

You can post new topics in this forum