martin wrote:
If I understand your question correctly you want to copy all remote files that have different timestamps than local files, no matter if they are newer or older, correct?
Then you need to set the
mirror
parameter to true.
https://winscp.net/eng/docs/library_session_synchronizedirectories#mirror
\
that is true thx for replaying
that is exacly what i need but how do i put that in de code can you give a example i have tryed everyting
this i what i have :
Dim SynchronizationResult As SynchronizationResult
SynchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, "My.Settings.DATA", "/Auto.Sync.Database/", False)
that works but now i need to MIRROR where the put it
searching my *** of on google but i can not find anything where to put the parameter function to mirror :( sorry i think it is pritty easy but if you not know where to put it :( i can search forever
Public Function SynchronizeDirectories(mode As SynchronizationMode, localPath As String, remotePath As String, removeFiles As Boolean, Optional mirror as Boolean = False, Optional criteria As SynchronizationCriteria = SynchronizationCriteria.Time, Optional options As TransferOptions = Nothing) As SynchronizationResult
that i know
but dunno what AS boolean mean .. i prity new to VB.net scripten so plsss HELP
thx in return
i got it fixed
Dim localpath As String
localpath = My.Settings.DATA
Dim remotepath As String
remotepath = ("/AutoSyncDatabase/")
Dim mirror As Boolean
mirror = True
Dim SynchronizationCriteria As SynchronizationCriteria
SynchronizationCriteria = 0
Dim SynchronizationResult As SynchronizationResult
SynchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, localpath, remotepath, mirror, True)
can you look at the code and say if this is the way it should work ore can i make it shorter to run faster :P
ore the short version :$
Dim mirror As Boolean
mirror = True
Dim SynchronizationResult As SynchronizationResult
SynchronizationResult =
session.SynchronizeDirectories(
SynchronizationMode.Local, My.Settings.DATA, "/AutoSyncDatabase/", mirror, True)
greats