Skip to content

samyuktaprabhu/file-synchronizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

file-synchronizer

File Synchronizer

A Python script to synchronize two folders one-way.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

This file synchronizer periodically maintains an identical copy of a source folder in a destination folder (replica). Any file or folder changes with operations like creation, deletion, modification (eg: rename, content change) are handled by this script.

(back to top)

Built With

  • Python (version >= 3.8)

(back to top)

Getting Started

To get a local copy up and running, follow the steps mentioned below. (These steps are for MacOS)

Prerequisites

  • VSCode / Terminal
  • Git Repo

    Installation

  1. Clone the repo to your local destination on computer
    git clone https://github.com/samyuktaprabhu/file-synchronizer.git
  2. Create a new Output file (eg. 'output.txt')
  3. In the same root folder, create 2 folders - source and replica. Note down its path.
  4. Open Terminal
  5. Navigate to the root folder of the cloned project
  6. In the terminal, run the command in this format-
python3 synctask.py <your_source_file_path> <your_replica_file_path> <your_sync_interval> <your_log_file_path>

Example:

python3 synctask.py /Users/username/Desktop/file-synchronizer-master/source/ /Users/username/Desktop/file-synchronizer-master/replica/ 5 /Users/username/Desktop/file-synchronizer-master/output.txt
  1. Perform any of the operations mentioned in the description aboce to see the synchronization between the files / folders.

(back to top)

Usage

Python has been used to write this script.

For information, please refer to the Documentation

Following libraries have been used in the script.

For information on 'os', please refer to the Documentation

For information on 'shutil', please refer to the Documentation

For information on 'threading', please refer to the Documentation

For information on 'sys', please refer to the Documentation

For information on 'datetime', please refer to the Documentation

(back to top)

Contact

Email - samyuktaprabhu@gmail.com

(back to top)

About

A Python script to synchronize two folders one-way.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages