LnkScout is a command-line tool for scanning .lnk (shortcut) files in a specified directory. It identifies valid and invalid shortcuts, optionally removes broken ones, and ensures system-critical shortcuts remain untouched.
LnkScout <directory path> [--valid/-v | --invalid/-i [--remove/-r]] [--sort/-s] [--nobanner/-n] [--help/-h]-v, --validDisplay only valid shortcuts.-i, --invalidDisplay only invalid shortcuts.-r, --removeRemove invalid shortcuts (except protected system files).-s, --sortSort output: Skipped first, Valid second, Invalid last.-n, --nobannerSuppress the banner output.-h, --helpDisplay this help message.
This tool is part of the 8gudbitsKit project. To download the executable for Windows, visit the 8gudbitsKit repository.
- Uses Windows COM API (
IShellLinkW,IPersistFile) to resolve.lnkfiles. - Checks shortcut validity by verifying the target path exists.
- Uses recursive directory scanning to process all subdirectories.
- Supports sorting results for better readability.
- Handles CLI arguments using
std::vectorfor input parsing. - Ensures safe deletion of invalid shortcuts while preserving system stability.
Note: This tool is designed for Windows environments and may not work on other platforms.