ozap is a small Odin utility that moves media files from the macOS Desktop into a dated backup folder.
The current program scans /Users/kevintung/desktop for regular files with these extensions:
.png.jpg.jpeg.mov
Matching files are moved into /Users/kevintung/backup_screenshots/YYYYMMDD, where YYYYMMDD is the current local date.
.
├── main.odin # Odin source for the backup utility
└── README.md # Project overview and usage notes
- Odin compiler installed and available as
odin - macOS-style source and destination paths, as currently hard-coded in
main.odin
Verified locally with:
odin version dev-2026-05:ea5175d86
Check the project:
odin check .Build an executable:
odin build . -out:ozapAfter building:
./ozapOr run directly with Odin:
odin run .When a file is moved successfully, the program prints a message like:
done archive: /Users/kevintung/backup_screenshots/20260610/example.png
- Files are moved with
os.rename, not copied. - The destination date folder is created automatically if it does not already exist.
- Existing destination files with the same name may be replaced on macOS because the program uses
os.rename. - The source directory, destination directory, and allowed extensions are currently constants in
main.odin.
Useful command before committing changes:
odin check .