Cleaning Week: Removing Traces (Recents)

by Jun 3, 2016

Cleaning week comes to an end. As a last part, you may want to check the list of files you recently opened. This list is full of privacy sensitive information, and the files listed here are not necessarily “recent”. If you never clean up the list, it can reach back quite far into history:

# dump list of recently opened files
$Path = [System.Environment]::GetFolderPath('Recent')
Get-ChildItem -Path $Path

All of these files are links, so they can be safely removed. To clean up your traces, try this (and again, remove -WhatIf to actually delete files):

# clean recent file list
$Path = [System.Environment]::GetFolderPath('Recent')
Get-ChildItem -Path $Path -File | Remove-Item -WhatIf

Twitter This Tip! ReTweet this Tip!