Post a reply

Options
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)

Options

Topic review

martin

Re: Copy by task manager (WIN) to (LIN) and "No Overwriting"

Use synchronization instead:
synchronize remote -criteria=none -filemask=PA4_C3_APP_STD_05* R:\Backups /veeamxfsrepo/backups/PA4_C3_APP_STD_05

The -criteria=none makes it transfer nonexisting files only.
fernandosouza

Copy by task manager (WIN) to (LIN) and "No Overwriting"

Hello everyone,

I need to copy the several big files WIN to LIN by WinSCP, but I need to no overwrite the files on the target host.
Ex of my CLI:
$PSNativeCommandArgumentPassing = "Legacy"
& "C:\Program Files (x86)\WinSCP\WinSCP.com" `
  /log="C:\Users\ADM-fsouza\Documents\script\WinSCP.log" /ini=nul `
  /command `
    "open sftp://root:Pl4DMr4f%285Flg0R%25fdo%24eo.Tg@sa72i085/ -hostkey=`"`"ssh-ed25519 255 15v8qt/geQzjV1XpbWjR0fcUJ2xVhUwrVrxVXwZjGtI`"`"" `
    "put R:\Backups\PA4_C3_APP_STD_05* /veeamxfsrepo/backups/PA4_C3_APP_STD_05" `
    "exit"
 
$winscpResult = $LastExitCode
if ($winscpResult -eq 0)
{
  Write-Host "Success"
}
else
{
  Write-Host "Error"
}
 
exit $winscpResult