No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| compare_files.py | ||
| compare_gui.py | ||
| copy_missing_files.py | ||
| list_files.py | ||
| README.md | ||
File Transfer Audit & Restore Tool
A suite of Python tools designed to identify missing files between two machines and restore them easily. It includes a comprehensive Graphical User Interface (GUI) for an all-in-one workflow.
Features
- Scan: Generate detailed lists of files from any directory, including absolute paths.
- Compare: Identify discrepancies between two file sets (Machine 1 vs Machine 2).
- Restore: Automatically copy missing files from their original sources to a destination folder.
- GUI: A user-friendly interface that combines the entire workflow into one application.
Components
1. CLI Tools (for automation)
list_files.py: Scans a directory and exports filenames and absolute paths to a JSON file.- Usage:
python list_files.py /path/to/dir
- Usage:
compare_files.py: Compares two JSON files and identifies which names in the first are missing from the second.copy_missing_files.py: Uses a detailed "missing files" JSON to restore files from their original source paths to a destination directory.
2. Graphical User Interface (GUI)
The compare_gui.py script provides an integrated, step-by-step workflow:
- Step 1: Scan Directory: Generate a master list of files from your primary machine.
- Step 2: Compare Results: Select the Machine 1 JSON and a Machine 2 JSON to find discrepancies. You can then save the missing files as a new, detailed JSON.
- Step 3: Restore Missing Files: Load the "missing files" JSON and choose a destination folder to automatically restore all files from their original source paths.
Installation & Requirements
- Python 3.x
- Tkinter (Standard library; if missing on Linux, use
sudo apt install python3-tk)
Usage Examples
Command Line Interface
# 1. Generate list from Machine 1
python list_files.py /path/to/machine1 --output machine1.json
# 2. Compare lists to find missing files
python compare_files.py machine1.json machine2.json --output missing.json
# 3. Restore the missing files
python copy_missing_files.py --list missing.json --dest ./restored_folder
Graphical User Interface
Simply run the GUI to follow the step-by-step wizard:
python compare_gui.py
This app was created with Gemma 4 26B.
License
Licensed under the GNU General Public License v3.0.