C# Console application for a one-way folder sync.
The application takes 4 arguments, 2 mandatory (From, To) and 2 optional (SyncIntervalSeconds, LogFile ).
- From - path of source folder
- To - path of target folder
- SyncIntervalSeconds - the time interval between two consecutive synchronizations. If the argument is not provided or its value is less than 1, the synchronization is one-time without repetition.
- LogFile - a path to a file where a text log will be saved. Note that if the app is terminated forcefully, part of the logs might be lost.
There are 4 allowed ways (orders) to pass arguments:
- From To
- From To SyncIntervalSeconds
- From To LogFile
- From To SyncIntervalSeconds LogFile
The synchronization loop can be stopped by pressing any key. The program will wait until the end of (possible) pending sync and exit afterwards.
Created by Petr Sedláček in 2023.