A Tool that can sync two folders!
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.
./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.
- 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!
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.
- Introduction and Description: Clearly states what the tool does and how it works.
- Synopsis: Provides the command-line options and their descriptions.
- Important Note: Alerts users to the potential risks of using the tool.
- 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.