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: SYNC VB.NET

Correct is:

session.SynchronizeDirectories(SynchronizationMode.Local, localpath, remotepath, True)
Donald

Re: SYNC VB.NET

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
Donald

SYNC VB.NET

first thanks for all the things you do for all the ppl

i wan't to sync from REMOTE to Local folder

the time stamps (files) of the remote must always be the same as local

because file's are changes @ startup of the program and things can be alternt so the time stamps of the LOCAL are newer than REMOTE so SYNC thosent work because Local is newer, SIZE is not readble because thare is a small change (one letter is changest to a other but the size those not change LOGIC )

so SYNC only files that are changes on the LOCAL DIFFERTN TIME stamps as REMOTE

can be done i think :P but how do i program this in VB.NET
greats