Recent is a CLI tool for Windows to quickly search and list recently created or modified files. Even if you don't remember the exact filename, you can find files based on time-criteria like "saved a moment ago" or "downloaded today", then apply explicit actions to the indexed result.
- Time-Based Sorting: Automatically sorts and lists files by the newer of their creation or modification times (you can also use only one of them using
--createdor--modified). - Explicit Action Commands: After listing results, use
recent open <index>,recent reveal <index>,recent path <index>, orrecent copy <index>to act on the numbered entry. - Category Filtering: Filter files by category such as images, videos, documents, or source code.
- Fast Run-time Scanning & Exclusions: Automatically skips system files, hidden files, and development folders like
.gitornode_modulesfor extremely fast scans.
Ensure you have Go 1.21 or later installed.
git clone https://github.com/yhotamos/recent.git
cd recent
go build -o recent.exe main.goAfter building, place the generated recent.exe in a directory included in your system's PATH environment variable.
By default, it searches files in standard user directories (Desktop, Downloads, Documents, Pictures, Videos) sorted by date descending.
recentExample Output:
# Time Reason File
--------------------------------------------------------------------------------
1 2 minutes ago created ~\Downloads\screenshot.png
2 18 minutes ago modified ~\Documents\report.docx
3 1 hour ago created ~\Videos\movie.mp4
First run a search/list command such as recent or recent --today --image to generate the numbered result set. Then use an explicit action command to operate on that saved result set:
- Open with default application
recent open 2
- Reveal and select in File Explorer
recent reveal 2
- Print absolute path
recent path 2
- Copy absolute path to clipboard
recent copy 2
- Filter by time range
recent --today # Files created/modified today only recent --days 7 # Files from the last 7 days only
- Filter by file types
recent --image # Image files (.png, .jpg, .gif, .webp, etc.) recent --video # Video files (.mp4, .mkv, .avi, etc.) recent --document # Document files (.docx, .pdf, .xlsx, .txt, etc.) recent --code # Code files (.go, .py, .js, .json, .md, etc.)
- Combine filters
recent --today --code
- Change result limit (default is 20)
recent --limit 50
- Output as JSON
recent --json
You can add, remove, and list custom search target folders.
- Add directory to search list
recent config add C:/project
- Remove directory from search list
recent config remove C:/project
- List current configuration (shows custom directories and global ignores)
recent config list
- Configuration file:
%APPDATA%\recent\config.json- Stores the search directories and ignore patterns.
- History cache file:
%LOCALAPPDATA%\recent\last_results.json- Temporarily stores the file paths of the last search result set, used to resolve index numbers for explicit commands such as
recent open 2,recent reveal 2,recent path 2, andrecent copy 2.
- Temporarily stores the file paths of the last search result set, used to resolve index numbers for explicit commands such as
yhotta240 https://github.com/yhotta240
MIT