How to delete sample clips and junk files from video folders in bulk
Sample clips, .nfo and .txt files, web shortcuts and thumbnail folders: here's how to clear the clutter out of a big, messy media library without touching the videos you want.
Sample clips, .nfo and .txt files, web shortcuts and thumbnail folders: here's how to clear the clutter out of a big, messy media library without touching the videos you want.
Collect video for long enough and every folder gains passengers. Next to the file you actually want there's a 30-second sample.mkv, an .nfo or .txt info file, a .url shortcut, a folder of screenshots, a Thumbs.db, and sometimes a second, smaller copy of the main video. None of it matters once the main file is safe, but across thousands of folders it adds up to clutter, wasted space and confusing search results.
This guide shows how to find and remove that clutter in bulk with free Windows tools, how to avoid deleting things you need, and where SceneSort Pro fits in.
| File | What it is | Usually safe to remove? |
|---|---|---|
sample.mkv, *-sample.mp4, a Sample\ folder | A short preview clip of the main video | Yes, once the main video plays |
.nfo | A text info file. Careful: Kodi, Jellyfin and Emby also use .nfo files for metadata | Only if no media server relies on them |
.txt, .url, .lnk, .html | Notes, web shortcuts and links | Usually |
Screens\ folders, loose .jpg or .png | Screenshots or cover images | Usually. Keep poster.jpg or folder.jpg if a media server shows them |
.srt, .ass, .sub | Subtitles | No. Keep these next to their video |
Thumbs.db, desktop.ini | Windows cache and folder settings | Harmless either way; Windows recreates them |
Open PowerShell in the top folder of your collection and run this. It changes nothing; it just counts files by extension and size:
Get-ChildItem -Recurse -File |
Group-Object Extension |
Select-Object Name, Count, @{n='MB';e={[math]::Round(($_.Group | Measure-Object Length -Sum).Sum/1MB)}} |
Sort-Object MB -Descending | Format-Table -AutoSize
Video extensions (.mkv, .mp4, .avi) should be at the top. Everything else in the list is a candidate for clean-up.
Bulk deletes are where mistakes happen. Instead, move the junk to one holding folder, check your library still works, then delete the holding folder a week later.
Sample clips (files with "sample" in the name, smaller than 200 MB, plus any folder called Sample):
$hold = 'D:\_Junk'
New-Item -ItemType Directory -Force $hold | Out-Null
Get-ChildItem -Recurse -File -Include *.mkv,*.mp4,*.avi |
Where-Object { $_.Name -match '(^|[\.\-_ ])sample([\.\-_ ]|$)' -and $_.Length -lt 200MB } |
ForEach-Object { Move-Item $_.FullName (Join-Path $hold ($_.Directory.Name + ' - ' + $_.Name)) -WhatIf }
Info files and shortcuts:
Get-ChildItem -Recurse -File -Include *.txt,*.url,*.lnk,*.html |
ForEach-Object { Move-Item $_.FullName (Join-Path $hold ($_.Directory.Name + ' - ' + $_.Name)) -WhatIf }
Both commands end in -WhatIf, so the first run only prints what would move. Read the list. When you're happy, run it again without -WhatIf. Add *.nfo to the second list only if no media server uses those files.
Once samples and screenshots are gone, you'll have empty Sample and Screens folders. This lists empty folders, deepest first:
Get-ChildItem -Recurse -Directory | Sort-Object { $_.FullName.Length } -Descending |
Where-Object { -not (Get-ChildItem $_.FullName -Force) } |
ForEach-Object { Remove-Item $_.FullName -WhatIf }
As before, remove -WhatIf when the list looks right. If you'd rather click than type, the free tool Czkawka has an Empty Folders tool that does the same with a preview.
The free edition of SceneSort Pro has every feature and works on your first 500 files, with no time limit. Pro: unlimited files, US$29 one-time.
Scripts only find junk with a predictable name. The harder cases are extra copies with ordinary names: a short preview called clip.mp4, a phone-sized copy of the main file, or the same video kept in two folders. These need a tool that compares what the videos look like.
That's where SceneSort Pro, our Windows app for organising a big, messy media library, helps:
\\NAS\Videos) and scan.Afterwards, Clean Names and Tidy Folders suggest readable names for the files and folders that are left, and you approve each change. The free edition has every feature for your first 500 files.
Plex mostly uses its own agents, but Kodi, Jellyfin and Emby can read metadata from .nfo files. If you use one of those, keep .nfo files that sit next to a video with the same name.
Leave .srt and other subtitle files out of every clean-up command. If you later rename the video, rename its subtitle to match (for example Holiday 2024.mp4 and Holiday 2024.en.srt).
It's a cautious starting point. Change it to suit your collection, and always run with -WhatIf first.
The free edition finds extra copies, cleans names and tidies folders for up to 500 files. Offline, no account.
Try it free on 500 filesFree from the Microsoft Store. Pro: unlimited files, US$29 one-time · other install options
Optional: get 20% off the full version
We never sell your email. See our privacy policy.