mavenlooki.blogg.se

Winxp sync folders
Winxp sync folders









winxp sync folders
  1. #Winxp sync folders how to#
  2. #Winxp sync folders windows#

Cancel may be requested by the user (the Stop button of the example) or by the control itself if an error has occurred. SyncCancelling = 8: Cancel requested, waiting for the synchro thread to stop. SyncReady = 2: Ready: The handle has been created. NET GDI to put the control into the form. SyncDeferred = 1: Deferred until the handle of the parent window is created. The parent window should not be closed if the status is not stopped or stopping. SyncStopped = 0: Not started or finished. Useless in multithread mode (use the status returned by SyncDone). Public ExitStatus As SyncStatus: Status returned in console mode. Public thrSynchro As Threading.Thread: The thread run for actual synchronization itself, for special purposes. Public RunningStatus As SyncStatus: Status of the copy. Public strCopied As String(): List of completed actions. Not used in the example: the progress bar is enough. Public lngSyncCopyDone As Long: Bytes already copied. Public lngSyncCopySize As Long: Bytes to copy. Displayed in the “File being processed” box of the application. Public strWhatsOn As String: Describe what the synchro thread is doing. Start the job with ctlSynchro1.SyncStart.Īt any time, the following public properties are used to follow what the control is doing: The example application ( frmDocument form) uses checkboxes to set the options and the CalculateOptions Sub to set syncOptions according to them. This option is necessary if the target is a Samba NAS for example, or many files that have not been modified will be copied every time despite the SyncPreserveNewerFiles option because timestamps are rounded by Samba. Tolerance is given by SambaTimeError (in ms, 1000 by default). Consider file timestamps are equal even when they are a bit different. Do not evaluate the size and number of files to copy to save time, start copying immediately (the progress bar will not be able to show progression). Display a message box at the end of the process (else, close the current window). Do not ask for confirmation when a file or a folder must be deleted. Do not ask for confirmation when a new file must be created. Delete target files or folders if they do not exist in the source. Do not copy a file if it does not already exist (in other words, just update, never create files). Tested on a Netware file server, it always rewrites the files. This option uses the UTC time of the last file modification. Overwrite read-only files and folders, if necessary. Public blnConsoleMode As Boolean: Choose between form/multithread or console/single thread mode. Public strLogFile As String: Log file name. Public synOptions As SyncOptions: Synchronization options, a combination of option values. Public strExcludedStrings As String: File and folder name patterns excluded from the copy. Public strTarget As String: Target folder. Public strSource As String: Source directory. Put the control (say ctlSynchro1) onto your form and set its properties: It is currently localized in French and English.

#Winxp sync folders windows#

X86: for any version of Windows > XP SP3. X64: For any 圆4 version of Windows > XP SP3. Synchro (the application) is, however, much easier to use by common people. It was not written to replace Robocopy (from Windows Resource Kit) as a tool typically used in a scheduled task.

winxp sync folders

It runs both interactively or as a command line (see Help for the syntax). It allows synchronizing several folders at the same time and saving parameters as documents.

winxp sync folders

#Winxp sync folders how to#

The example application uses all the control properties and shows how to get information about the control status and treat the final event. It may also be used in a console application, as a single thread. When it is done, it raises an event SyncDone. The control is visually a progress bar that can be added to a form.Īfter its properties have been set, it can be launched by its method SyncStart.Ī separate thread is run so the program interface remains reactive. The Synchro control is a Visual Studio multithreaded user control allowing folder copy and synchronization.











Winxp sync folders