Script powershell – Synchronise multiple folders with remote directory with WinSCP script
What I want to achieve is to watch multiple local folders and whenever there is a file added to one of these folders I want that it must synchronise/copy those folders to the remote directory that is specified. If I execute my code nothing happens.
This is what I tried in Powershell:
Script powershell – Synchronise local folders with remote directory with WinSCP
I’m writing a Powershell script using WinSCP where I want to synchronize all files that are put into a local folder (or folders) and whenever this happens it should be transfered/copied to a sftp server, remote directory.
I tried the following but this only detects it but doesn’t copy it to the sftp server directory. Thank you in advance for the help.