Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


How can I automate to put the two latest file?

& "C:\Program Files (x86)\WinSCP\" `
  /log="C:\writable\path\to\log\WinSCP.log" /ini=nul `
  /command `
 "open sftp://
lcd `"`"C:\Program Files\Microsoft SQL Server\Backup`"`"" `
    "cd /owncloud/backup" `
    "put latest file 1" `
    "put latest file 2" `
$winscpResult = $LastExitCode
if ($winscpResult -eq 0)
  Write-Host "Success"
  Write-Host "Error"
exit $winscpResult