Format:Windows Recycle Bin ($I and INFO2 files)
| On this wiki | Facts · Code · Notes · Topics |
|---|
How Windows records deleted files: $Recycle.Bin\<SID>\$I (metadata) and $R (data) files since Vista, with $I versions 1 (Vista) and 2 (Windows 10), and the older Recycler INFO2 index of Windows 9x/2000/XP.
Windows keeps a per-user record of soft-deleted files. Two generations exist; both are little endian with FILETIME (UTC) timestamps. Layouts from libyal/dtformats documentation (read at the pinned commit).
$Recycle.Bin ($I and $R files, Vista and later)
Files live in C:\$Recycle.Bin\<SID>\ (one folder per user SID). A deleted file becomes a pair: $R<random>.<ext> holds the data of the original file, and $I<same random>.<ext> holds its metadata. The source lists the keywords "$I file, $R file".
$I file layout
| Offset | Size | Field |
|---|---|---|
| 0 | 8 | format version: 1 or 2 |
| 8 | 8 | original file size |
| 16 | 8 | deletion date and time (FILETIME) |
| 24 | ... | version 1: original filename, UTF-16LE with end-of-string character (the $I file is of variable size) |
| 24 | 4 | version 2: number of characters in the original filename |
| 28 | ... | version 2: original filename, UTF-16LE with end-of-string character |
Version 1 was introduced in Windows Vista, version 2 in Windows 10. The filename is the full original path.
Recycler (INFO2, Windows Me, 2000, XP, 2003)
Files live in C:\Recycler\<SID>\: an INFO2 index plus the renamed data files. Strings are extended ASCII (a codepage) and, from Windows 2000, also UTF-16LE.
INFO2 header, 20 bytes: unknown 0x05 (offset 0), unknown (number of file entries, offset 4), unknown (previous number of entries, offset 8), file entry size (offset 12: 280 on Windows Me, 800 on Windows 2000 and later), unknown (offset 16: 0 on Windows 2000, 5 on XP).
File entry (800 bytes on Windows 2000 and later): original filename as ASCII at +0 (260 bytes, MAX_PATH = 1 + 2 + 256 + 1; unused bytes may hold remnant data), index within the INFO2 file at +260, drive number at +264, deletion time FILETIME at +268, unknown 4 bytes at +276 (original file size? the source saw 4096 for a 5 byte file), and when the entry size is above 280 the UTF-16LE original filename at +280 (520 bytes).
Use in reverse engineering
A $I file shows what a program or user deleted, the original path, size and when, even after the $R data is gone. Unverified: the exact way the $R/$I name suffix is chosen was not read in the sources.
Code & repositories
- https://github.com/libyal/dtformats @
308ce8c38df2eb95a71b6e832b3f9803f0c4b169· license: Apache-2.0 (declared by the contributor for the files used; GitHub reports Apache-2.0 (read from LICENSE; GitHub's API was busy) for the repository)
libyal data format specifications; documentation/Windows Recycle.Bin file formats.asciidoc, Windows Recycler file formats.asciidoc, Job file format.asciidoc, RecentFileCache.bcf format.asciidoc.
Tested on: source read, not run · checked 2026-10-19
See also
Format:Windows Shell Link (LNK), Format:Windows Prefetch, Format:Windows Jump Lists.