A small macOS Python CLI utility to scan a directory and list the largest files. Dry-run by default; use --do-move --i-understand to perform moves.
Usage examples
- List top 20 files in a directory (interactive picker if no path):
python sort_files_by_size.py /path/to/scan --limit 20 ## GUI & macOS app This repository now includes a simple Tkinter GUI wrapper (`gui_sort_files.py`) and helper files to produce a macOS `.app` bundle. - Run the GUI directly from source: ```bash python3 gui_sort_files.py- Double-click launcher (macOS):
Make run_gui.command executable once and then double-click it in Finder:
chmod +x run_gui.command # then double-click run_gui.command in Finder- Build a macOS
.appwith PyInstaller:
See BUILD_APP.md for full steps. A helper script build_app.sh automates icon conversion and the PyInstaller build.
-
CI: A GitHub Actions workflow (
.github/workflows/build-macos-app.yml) is available on branchfeature/build-appand will produce the.appas an artifact when run on a macOS runner. -
Locally-built .app location (by default):
dist/SortFilesBySize/SortFilesBySize.app- You can copy it to
/Applicationsor~/Applications.
If you'd like a signed/notarized build or a single-file distribution, open an issue or request and I can add those steps.
- Dry-run moving indices 1–3 to default destination: ```bash python sort_files_by_size.py /path/to/scan --move-index 1-3 - Actually move (dangerous — only when you understand consequences):
python sort_files_by_size.py /path/to/scan --move-index 1-3 --do-move --i-understandSafety
- The script will not perform moves unless both
--do-moveand--i-understandare provided. - Be careful when moving or deleting files. Keep backups.