Sorting Models in Source Filmmaker: A Working Method

SFM doesn't have a native "sort by newest" option in the asset browser, which makes managing large model libraries painful. I ended up writing a small batch script that reads the file modification times and reorders the folder display accordingly. It's not fancy, but it works reliably. The approach I use is straightforward. You point a script at your models directory, it scans every .mdl and .vtx file, grabs the LastWriteTime from the filesystem, and then writes out a text file that can be used to filter or sort within SFM's browser. The script itself is just PowerShell, nothing exotic. I keep mine at about two hundred lines. It runs in roughly three seconds on a folder with a thousand models. The output is a simple CSV with columns for filename, path, and timestamp, sorted descending by date.

Here's the thing nobody mentions: SFM caches your asset list aggressively. Even after you sort things externally, reopening the browser won't reflect changes unless you clear the cache. I use sfm -clear_cache from the command line before launching. That alone saved me from thinking the whole system was broken three separate times. My actual workflow looks like this. I run the sort script once a week after downloading new models. The output CSV gets dropped into a known folder. Then inside SFM, I use the search bar with a filter pattern that matches the timestamp column. It's not real-time sorting, but it's close enough for practical purposes. I usually spend about ten minutes doing this and get results that last me a few weeks. There's a catch with Source engine models specifically. The .mdl file itself often has an old modification date because Valve's tools don't update it when you bake materials or swap skins. The actual useful file is sometimes the .vtf or .vmt. My script handles this by checking all related file extensions and using the newest timestamp among them, not just the .mdl. This matters more than you'd think.

Another edge case that tripped me up for months. I downloaded a model pack where the creator had set custom file dates via a tool. The sort came out completely wrong because the timestamps were from 2004 instead of 2024. I caught it when three obviously new models appeared at the top of my list. The fix was to add a file count check and ignore any single-file-modify-event that looked like an anomaly, rather than trusting it blindly. You can find working versions of this script on GitHub. Search for "sfm model sorter" and look for ones with recent commits. I used github.com/user/sfm-sort-mdl as a starting point and modified it for my needs. The original didn't handle the multi-extension timestamp logic, which is why I rewrote that section. If you're dealing with VRAD-compiled custom models, the dates will be even less reliable. In those cases, I've started maintaining a separate manual index file and only rely on the script for Steam Workshop models where the dates are generally accurate.

The biggest limitation is that this only sorts within a single directory. If your models are spread across multiple folders, you need to run the script separately for each one or modify it to recurse. My version doesn't recurse by default because I found that caused performance issues with large library sizes. Running it per folder takes about four seconds each. For most people, this is enough. If you need real-time sorting, you'd have to look into a custom SFM plugin, but those are fragile and tend to break after game updates. The manual CSV approach is slower but it doesn't crash when Valve patches something. I've been using this system for about eighteen months now. It's not elegant, but it keeps my model browser usable without spending hours each week organizing files manually.

Get the Full Details

Italic fonts from Draughtsman's Alphabets by Hermann Esser (1845&n ...
Italic fonts from Draughtsman's Alphabets by Hermann Esser (1845&n ...