Skip to main content

Compare(*diff*)/synchronize/backup/mirror folders quickly.

Project description

DirectSync

PyPI version MIT License image

An efficient and easy-to-use utility to compare/synchronize/mirror folder contents.

Demo

Demo gif

Usage:

directsync [-h] [-add] [-rm] [-ovr] [-rev] [-mirr] [-trash] [-cache]
           [-dry] [-no-bar]
           left-path right-path

positional arguments:
left-path             The path of the left(source) directory.
right-path            The path of the right(destination) directory.

optional arguments:
  -h, --help            show this help message and exit
  -add, --add-missing   Copy files from source which are absent in
                        destination.
  -rm, --remove-extra   Remove the files from destination which are absent in
                        source.
  -ovr, --overwrite-content
                        Overwrite the files having same name but different
                        content.
  -rev, --reverse-sync-direction
                        Use the right folder as source and the left as
                        destination.
  -mirr, --mirror-contents
                        Make the destination directory exactly same as the
                        source. Shorthand for `-add -rm -ovr`.
  -trash, --use-trash   Send to trash/recycle bin while deleting/overwriting.
  -cache, --use-cache   Whether to use previously cached comparison-check
                        result from disk.
  -dry, --dry-run       Just simulate and report the file operations that will
                        be performed with the current configuration.
  -no-bar, --hide-progress-bar
                        Whether to hide the progress bar or not. Will result
                        in a huge speedup iff the 2 directories are structured
                        very differently.

Installation:

  • pip install directsync

ToDo:

  • Add preserve-latest option: Among the 2 files, the one with the latest modification date should be preserved.
  • Give more fine-tuned control of file comparison algorithm to the user.
  • Add ignore-pattern option to let the user ignore certain files based on the regex pattern provided.
  • Add test cases.
  • Add code coverage.
  • Setup tox and Travis CI.
  • Add coloured output.
  • Handle nested structures with symlinks.
  • Provide direct interface with online storage services.
  • Add developer guidelines.
  • Add demo.
  • Add simulate option.
  • Add use-trash option to send to recycle bin instead of delete/overwrite.
  • Add cache option to cache the results of the previous difference check to disk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

directsync-1.2.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

directsync-1.2.0-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page