folder1 (created 2019)
folder2 (created 2020)
I've tried a "synchronize" script with a specific file mask. This works in principle but creates empty folders on the remote site for the 2019 local folders.
I found out that a filemask for directories is not possible.
So I've written a powershell script with "session.PutFiles" and selecting folders with "Get-ChildItem" by date. This again, works in principle but transfers folders that have been already transferred in a previous session again. Here I'd need something like "-neweronly", which seems to be not possible in powershell scripts.
I guess it is possible to compare a list of folders from the remote site with a list of local folders and transfer only folders which are not present on the remote server. But before I start writing such a script for powershell I'd like to ask if there is a more convenient or easy way to achieve a folder selection. Something like a filemask for directories would help. Thanks you very much in advance for your answer!