How to Sort Hundreds of Photos and Videos by Capture Date for Shotcut Editing
If you've ever come back from a trip with a phone full of photos and a drone full of clips, you know the problem: everything is mixed together, file names don't match the order things happened, and Windows "Date modified" is often wrong. This guide walks through a real example — sorting hundreds of files from a folder called Alicante julio 2026 — into a clean, chronological set ready to drop into Shotcut.
Why "Date Modified" Isn't Enough
Windows Explorer's "Date modified" timestamp reflects when the file was last written to disk, not necessarily when the photo or video was actually captured. This becomes a real problem when you're combining footage from different devices — for example, DJI drone videos and smartphone photos — because copying, syncing, or transferring files can change that timestamp. The result is a sort order that looks chronological but isn't. For a trip video where the sequence of events matters, this small discrepancy can throw off the whole story.
The more reliable approach is to read the actual capture date/time embedded in the file's metadata (EXIF data for photos, creation metadata for videos) rather than relying on the file system's modified date.
The Quick Fix: A One-Line PowerShell Script
For most cases, a fast and effective starting point is a PowerShell script that copies your files into a new folder, renamed and sorted by timestamp. Importantly, it never touches your original files — it only creates copies.
Here's what the script does:
- 📷 Includes JPG, JPEG, PNG, and HEIC photos
- 🎥 Includes MP4, MOV, AVI, M4V, MTS, and M2TS videos
- 🕐 Sorts everything by timestamp
- 🔢 Renames copies sequentially, e.g.
0001_20260710_101523.jpg - 📁 Places all copies in a new
SORTEDsubfolder - ✅ Leaves your original files completely untouched
Step 1: Open PowerShell
Press the Windows key, type PowerShell, and open Windows PowerShell.
Step 2: Copy and paste this command
$src="C:\Users\Girish\Videos\Alicante julio 2026"; $dst="$src\SORTED"; New-Item -ItemType Directory -Force -Path $dst | Out-Null; Get-ChildItem $src -File | Where-Object {$_.Extension -match '\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$'} | Sort-Object LastWriteTime | ForEach-Object -Begin {$i=1} -Process {$ext=$_.Extension.ToLower(); $name="{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i,$_.LastWriteTime,$ext; Copy-Item $_.FullName (Join-Path $dst $name); $i++}
Step 3: Check the result
The script creates a new folder:
C:\Users\Girish\Videos\Alicante julio 2026\SORTED
Inside, you'll find your photos and videos copied and renamed in order, like this:
0001_20260710_101523.jpg
0002_20260710_101601.mp4
0003_20260710_101745.jpg
0004_20260710_102012.mp4
A More Accurate Option: Reading Real Capture Metadata
The script above sorts by file timestamp, which works well for most single-device situations. But if your files came from multiple sources — a DJI drone, a phone, maybe a separate camera — and you need the exact capture time down to the second, a more advanced version reads the embedded metadata directly instead of relying on the file system. This is the recommended approach when timestamps must be perfectly accurate across mixed devices.
Getting the Sorted Files Into Shotcut
Once your SORTED folder is ready, the next question is how to bring hundreds of ordered files into Shotcut without losing that order. A few notes on this:
- Shotcut's Open File button (top-left) is designed for opening media files, but selecting hundreds of files at once through this dialog can scramble the order you worked hard to create.
- Instead, for large batches, use View → Playlist to open the Playlist panel, then add your sorted files there. Because they're already numbered sequentially, they'll load in the correct order.
- From the Playlist, you can then drag the files onto the Timeline in that same order, ready for editing.
Quick Recap
- Run the PowerShell script to create a chronologically sorted, renamed copy of your media in a new
SORTEDfolder. - Keep your originals untouched — the script only copies.
- Open Shotcut and use View → Playlist rather than Open File for large batches.
- Add the sorted files to the Playlist, then drag them to the Timeline in order.
With this workflow, a folder of hundreds of mixed photos and videos becomes a clean, chronological sequence ready for editing — no manual renaming, no guesswork about what happened first.
Watch the Final Result
Here's the finished video, edited from the sorted footage described above:
No comments:
Post a Comment