A Python-based developer tool that captures snapshots of a folder and compares them to detect added, modified, and removed files. The project includes a Streamlit web UI for easy interaction and a Folder Statistics feature that instantly previews folder details before creating snapshots. This project was developed as part of an On-the-Job Training (OJT) program to understand file system behavior, hashing, and UI integration using Streamlit.
- Captures a complete snapshot of a selected folder
- Stores file metadata (file path + MD5 hash) in a JSON file
- Helps track file-level changes across snapshot versions
Compares Snapshot A and Snapshot B to detect:
- 🟢 Added Files – Present in Snapshot B but not in Snapshot A
- 🟡 Modified Files – File content changed (detected via MD5 hash)
- 🔴 Removed Files – Present in Snapshot A but missing in Snapshot B
As soon as the user enters a folder name in the Streamlit UI, the app automatically displays:
- 📄 Total Files
- 📁 Total Folders
- 🕒 Last Modified Time
This instant preview helps users understand the folder structure before taking a snapshot.
A clean and simple browser-based interface that allows users to:
- Enter a folder name → Automatically view folder statistics
- Enter a snapshot name → Generate a snapshot
- Select two snapshots → Compare and view differences
- Clearly view added, modified, and removed files
-
Displays all snapshots in a structured table
-
Columns include:
- Snapshot Name
- Date & Time
- Number of files in the folder
- Confirmation checkbox (safe delete)
- Delete button
This feature helps users easily track which snapshots exist, when they were created, and safely delete them.
FILE-SYSTEM-SNAPSHOT-DIFFERENCE/
│
├── folder/ # Sample folder for testing
│
├── snapshots/ # Auto-generated snapshot JSON files
│
├── src/
│ ├── __pycache__/ # Cache files
│ ├── diff.py # Snapshot comparison logic
│ ├── file_compare.py # Line-by-line file comparison
│ ├── main.py # Streamlit backend logic
│ └── snapshot.py # Snapshot generation logic
│
├── app.py # Streamlit UI entry point
├── LICENSE
├── README.md
└── requirements.txt
- Python 3
- Streamlit
- JSON
- Hashlib (MD5)
- OS Module
pip install -r requirements.txtstreamlit run app.py-
Enter the folder name in the input field
-
Press Enter
-
The app automatically displays:
- Total Files
- Total Folders
- Last Modified Time
- Enter a snapshot name
- Click Take Snapshot
- A new snapshot JSON file is created inside the
snapshots/folder
-
Enter Snapshot A name
-
Enter Snapshot B name
-
Click Compare Snapshots
-
The UI displays:
- Added files
- Modified files
- Removed files
- Total Files: 1
- Total Folders: 0
- Last Modified:
2025-12-02 11:27:33
Added Files
test2.txt
Modified Files
README.mdtext1.txt
Removed Files
test3.txt
This OJT project is designed to help learners understand:
- How file systems store and update data
- How hashing helps detect content changes
- How to build real-world developer tools
- How to integrate backend logic with a Streamlit web UI
- How to compute folder statistics and metadata
- How to design clean, professional, and scalable project architecture
- Snapshot versioning and tagging
- Export diff results as reports
- UI filters and search
- Support for large directories and ignore rules
⭐ If you found this project useful, consider starring the repository!

