Skip to content

nbaak/file-sync-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Sync Tool

A Tool that can sync two folders!

How does it work

The tool reads al contents from folder a and b. If in folder b files are not the same as in folder a, the filde from folder a will be copied to folder b and overwrite the existing file.

Synopsis

./filesynctool.py -h

  -h, --help            show this help message and exit
  -f FOLDER, --folder FOLDER
                        Path to the source directory to scan.
  -d DESTINATION, --destination DESTINATION
                        Path to the destination directory to copy files to.
  -o OUTPUT, --output OUTPUT
                        Output file to write the hashes.
  --hash-only           Create a hash file without copying files.
  -c, --check           Check for files in the destination that would be overwritten.

Important Note

  • The tool copies files from the source directory to the destination directory, not the other way around.
  • Use with caution. The tool may overwrite existing files in the destination directory.
  • I take no responsibility for accidental deletion of files. Use at your own risk!

Examples

Create a Hash File Only:

python filesynctool.py -f /path/to/source -o output.txt --hash-only

Create a Hash File and Copy Files:

python filesynctool.py -f /path/to/source -d /path/to/destination -o output.txt

Copy Files Only (if hash file creation is not needed):

python filesynctool.py -f /path/to/source -d /path/to/destination

Check for Potential Overwrites and Additions:

python filesynctool.py -f /path/to/source -d /path/to/destination --check

Feel free to modify the script and the README as needed for your specific use case.

Key Points:

  1. Introduction and Description: Clearly states what the tool does and how it works.
  2. Synopsis: Provides the command-line options and their descriptions.
  3. Important Note: Alerts users to the potential risks of using the tool.
  4. Examples: Shows various ways to run the script with different options.

This README.md should be comprehensive enough to help users understand how to use your file synchronization tool effectively.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published