A Flask-based web application that analyzes your OneDrive folder, showing which files are stored locally versus in the cloud, and helping you free up disk space with simple controls.
OneDrive's Files On-Demand feature lets you keep files in the cloud while accessing them from your local device. However, many files end up being stored locally, taking up valuable disk space. This tool helps you:
- 🔎 Scan your OneDrive folder to identify which files are stored locally and which are "cloud-only"
- 📊 See detailed statistics about your storage usage and potential space savings
- 🚀 Free up space by making files "cloud-only" with a single click
- 🔍 Search and filter files to quickly find specific items
- ⚙️ Configurable OneDrive path without editing code
- ♾️ Unlimited folder depth recursion option
- 🎨 Easy-to-use web interface with modern design using Tailwind CSS
- 📈 Detailed storage statistics showing local vs. cloud usage
- 🗂️ File browser with sorting, filtering, and search capabilities
- 🪄 One-click space saving for individual files or batch operations
- 🚦 Status indicators clearly showing which files are using local storage
- 🗄️ File type recognition with appropriate icons for common file types
- 📱 Responsive design that works on desktop and mobile devices
- Windows operating system with OneDrive installed
- Python 3.8 or higher
- OneDrive for Business or Personal with Files On-Demand enabled
-
Clone or download this repository
-
Set up a Python virtual environment (recommended):
python -m venv venv venv\Scripts\activate
-
Install required dependencies:
pip install -r requirements.txt
-
Start the application:
python app.py
Or use the included batch file:
run_app.bat
-
Access the web interface and configure OneDrive path:
- Open your browser and go to:
http://127.0.0.1:5000
- On first run, you'll be prompted to set your OneDrive path
- Enter the full path to your OneDrive folder and click Save
- Open your browser and go to:
- Configure your OneDrive path if not already set up
- Set scan depth using the dropdown menu (higher values will scan more subfolders, or choose "Unlimited")
- Click "Scan OneDrive Files" to analyze your OneDrive folder
- View the storage overview to see statistics about your file storage
- Browse your files in the file list table
- Sort by clicking column headers
- Filter using the buttons at the bottom
- Search using the search box
- Free up space by:
- Clicking "Make Cloud-only" for individual files
- Clicking "Free All Local Files" to convert all files at once
This application leverages Windows-specific file attributes to identify which OneDrive files are stored locally versus "cloud-only". It uses the Windows attrib
command to:
- Check file attributes (the
P
andU
flags indicate Pinned and Unpinned status) - Modify attributes to make files cloud-only when requested
When you make a file "cloud-only", it remains accessible through Windows Explorer but doesn't take up local disk space. The file will be downloaded automatically when you open it.
- 🚫 Permission errors: Try running the application as administrator
- 🔄 OneDrive sync issues: Ensure OneDrive is properly set up with Files On-Demand enabled
- File showing as Cloud Only but is not: Ensure the File is not opened in another process.
- No files showing: Verify your OneDrive path is correctly configured in the app
- Changes not reflected: OneDrive may take a moment to update file status after changes
- Configuration issues: If the app doesn't start, check if
config.json
is corrupted or delete it to reset - Path not saving: Ensure the path exists and is accessible by the application
- Backend: Python Flask server
- Frontend: HTML5, Tailwind CSS, and Alpine.js
- File Operations: Windows command-line utilities (attrib)
- Data Analysis: Python file system operations
MIT License - See LICENSE file for details