跪拜 Guibai
← All articles
Backend · Java · Programmer

Directory Junctions Move 10GB of WorkBuddy Data Off a Full C Drive With History Intact

By SimonKing ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A full system drive can crash Windows and force a reinstall, so moving app data without losing history or rewriting app configs is a practical escape hatch. The same junction technique applies to any Windows app that hoards large files on C:.

Summary

WorkBuddy's data folder on Windows can quietly grow past 10GB, and on a nearly full C drive that is enough to crash the OS. Deleting it wipes the app's history, so the alternative here is a directory junction: an NTFS-level pointer that redirects every read and write from the original path to a target folder on another drive. The application never sees the change, no configuration or database path needs updating, and only one copy of the data exists.

A GUI tool built for the job steps through scanning (after the user exits WorkBuddy to prevent file locks), a dry run, export, migration with progress and logs, verification, rollback, and backup deletion. After migration, the original C drive location drops to 1.25GB while the bulk of the data lives elsewhere. The junction itself occupies only a few hundred bytes, and new logs and snapshots keep growing on the destination drive.

The whole script was generated by WorkBuddy's AI, turning an unfamiliar Windows feature into a working utility in one session. The tool is published on GitHub for anyone facing the same disk-pressure problem.

Takeaways
— .workbuddy can consume over 10GB on the C drive, and deleting it erases all history and snapshots.
— A directory junction is an NTFS-level redirect: programs still use the original path, but files are physically stored on another drive.
— The junction is not a copy, sync, or backup; exactly one copy of the data remains and all new writes go to the new location.
— The junction sign itself takes only a few hundred bytes, so the C drive footprint does not grow again.
— The migration GUI includes scan, dry-run, export, verify, rollback, delete backup, and migrate operations.
— WorkBuddy must be fully closed during the scan to avoid file locks.
— After migration, C drive usage for this folder fell from more than 10GB to 1.25GB.
— The tool is at https://github.com/simonking-ws/workbuddy-migrator.
Conclusions

Directory junctions turn the 'delete history or keep a full drive' dilemma into a redirect that preserves both, and because the app is unaware, rollback only requires removing the junction and restoring files.

The tool's scan, dry-run, verify, rollback, and backup-deletion steps make this a repeatable filesystem migration pattern, not just a one-off fix for one app.

AI removed the need to learn NTFS junction mechanics before writing the tool; the idea and workflow mattered more than the low-level API.

Concepts & terms
Directory junction
A Windows NTFS feature that redirects access to a folder path to another location on the filesystem. Programs that read or write the original path are transparently sent to the target folder, with no application-level configuration change needed.
From the discussion
Featured comments
码字仙人

I can simply choose not to install WorkBuddy.

SimonKing

That works. [grin]

See top comments, translated →
Source: juejin.cn ↗ Google Translate ↗ Backup ↗