Skip to content

Python script that allows you to synchronize the contents of two folders on macOS

License

Notifications You must be signed in to change notification settings

Disconnecter/SyncFoldersScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Folder Synchronization Script

The Folder Synchronization Script is a Python script that allows you to synchronize the contents of two folders on macOS. It compares the files and subfolders between the source folder and the target folder, and performs the necessary operations to make the two folders identical.

Usage

  1. Ensure that you have Python installed on your macOS system.

  2. Download or clone the script to your local machine.

  3. Open a terminal and navigate to the directory where the script is located.

  4. Run the script using the following command, providing the paths to the source and target folders:

    python sync_folders.py -s /path/to/source/folder -d /path/to/target/folder

    Replace /path/to/source/folder with the actual path to your source folder, and /path/to/target/folder with the actual path to your target folder.

    Note: The target folder will be created if it doesn't exist.

  5. The script will compare the contents of the source and target folders and perform the necessary operations to synchronize them. It will copy missing files and subfolders from the source folder to the target folder, and remove files and subfolders from the target folder that are not present in the source folder.

  6. The script will display the actions performed during the synchronization process in the terminal.

Disclaimer

Make sure to backup your data before running the script, as it can modify and delete files and folders. Use the script at your own risk.

Requirements

  • Python 3.x

License

This script is provided under the MIT License. See the LICENSE file for more information.

About

Python script that allows you to synchronize the contents of two folders on macOS

Resources

License

Stars

Watchers

Forks

Languages