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


Powershell Sync local issue

Thanks for the help. I got it all to working now. I will give the .NET assembly a try.

Re: PowerShell Sync local issue

You have the quotes wrong. It should be:
    "synchronize local `"`"E:\BluHorseJMS\Bluhorse-Data\Latest\Files\Silent\`"`" `"`"/SilentUpdates/ChesterTN/`"`"" `


Though you actually do not need the inner quotes at all, as there are no spaces in your paths:
    "synchronize local E:\BluHorseJMS\Bluhorse-Data\Latest\Files\Silent /SilentUpdates/ChesterTN" `

It's way better and easier to use WinSCP .NET assembly in PowerShell than WinSCP command-line:

PowerShell Sync local issue

I am having issue with the local sync using PowerShell not adhering to the the provided paths. I'm using version 5.17.10 build (11087) on Windows 10 Pro. It seems to be using the user directory of the current user and the root of the FTP connection regardless of what I pass. It moves files as it should, just the wrong files. I have also created a batch file to do the same thing and it works flawless but I need it as PowerShell so I can create and encoded command to use in another automation program for my SQL server.
PS C:\Users\bluhorse> & "E:\BluHorseJMS\Bluhorse-Data\Interfaces\FTP Service\" `
  /log="E:\BluHorseJMS\Bluhorse-Data\Interfaces\FTP Service\WinSCP.log" /ini=nul `
  /command `
    "open ftp://???" `
    "synchronize local "E:\BluHorseJMS\Bluhorse-Data\Latest\Files\Silent\" "/SilentUpdates/ChesterTN/"" `

Connecting to xx.xx.xx.xx ...

Starting the session...
Session started.
Active session: [1] ???
Local 'C:\Users\bluhorse' <= Remote '/'
Local 'C:\Users\bluhorse' <= Remote '/'
Anderson, SC              |            0 B |    0.0 KB/s | binary |   0%