Sort Photos & Videos by Capture Date and Time for Editing

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. You'll see two ways to do it: a safe copy into a new folder, and a rename in place that uses no extra disk space.

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.

Which Option Should You Choose?

Both options use the same naming pattern and the same file types. The difference is what happens to your original files and how much disk space you need.

  • Option A – Copy to a new SORTED folder: the safest choice, because your originals are never touched. The trade-off is that every photo and video is duplicated, so you need as much free space as the whole folder takes. With large drone and 4K clips, that can be many gigabytes.
  • Option B – Rename in place: no new folder and no duplicates, so it takes no extra disk space. The trade-off is that the original file names are replaced, so the script saves a log file that lets you trace every old name.

If you have limited disk space or very large video files, Option B is the better fit.

Option A: Copy Into a New SORTED Folder

This PowerShell script copies your files into a new folder, renamed and sorted by timestamp. 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 SORTED subfolder
  • ✅ Leaves your original files completely untouched
  • ⚠️ Uses extra disk space equal to the size of all copied files

Step 1: Open PowerShell

Press the Windows key, type PowerShell, and open Windows PowerShell.


Step 2: Copy and paste this command

Enter your folder address. This is an example: C:\Users\Videos\Alicante julio 2026
$src="C:\Users\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\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

Once you've confirmed everything is correct in SORTED folder, then you can use it. At last you can decided to delete either the SORTED folder or your originals to free up the duplicated space — but only after checking the result.

Option B: Rename in Place (No Extra Disk Space)

If you don't want duplicates, rename the files directly in the same folder. Renaming only changes the name written in the file system — the photo or video data is not copied or moved — so it uses no additional space, and each file keeps its original "Date modified" value.

Here's what this version does:

  • πŸ“·πŸŽ₯ Handles the same photo and video formats as Option A
  • πŸ• Sorts everything by timestamp, then renames in that order
  • πŸ”’ Uses the same naming pattern, e.g. 0001_20260710_101523.jpg
  • πŸ’Ύ Creates no new folder and no copies, so there is no extra disk usage
  • 🧾 Saves a rename_log.csv file listing every old and new name, so you can trace the originals
  • πŸ§ͺ Offers a preview mode that shows the new names without changing anything

Step 1: Preview first (recommended)

Open PowerShell and run this preview. It uses -WhatIf, so it only shows what would be renamed and changes nothing. If PowerShell warns you about pasting multiple lines, choose Paste anyway — that's a normal Windows prompt.

$src = "C:\Users\Videos\Alicante julio 2026"
$files = @(Get-ChildItem $src -File |
  Where-Object { $_.Extension -match '^\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$' } |
  Sort-Object LastWriteTime)
$i = 1
foreach ($f in $files) {
  $new = "{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i, $f.LastWriteTime, $f.Extension.ToLower()
  Rename-Item -LiteralPath $f.FullName -NewName $new -WhatIf
  $i++
}

Step 2: Run the real rename

If the new names look right, run this version. It renames the files in the same folder and writes the log file.

$src = "C:\Users\Videos\Alicante julio 2026"
$files = @(Get-ChildItem $src -File |
  Where-Object { $_.Extension -match '^\.(jpg|jpeg|png|heic|mp4|mov|avi|m4v|mts|m2ts)$' } |
  Sort-Object LastWriteTime)
$i = 1
$log = foreach ($f in $files) {
  $new = "{0:D4}_{1:yyyyMMdd_HHmmss}{2}" -f $i, $f.LastWriteTime, $f.Extension.ToLower()
  [pscustomobject]@{ Old = $f.Name; New = $new }
  Rename-Item -LiteralPath $f.FullName -NewName $new
  $i++
}
$log | Export-Csv "$src\rename_log.csv" -NoTypeInformation -Encoding UTF8

Step 3: Check the result

Open the folder in Explorer. Your photos and videos are still in the same place, now numbered in chronological order:

0001_20260710_101523.jpg
0002_20260710_101601.mp4
0003_20260710_101745.jpg
0004_20260710_102012.mp4
rename_log.csv

Important notes for Option B

  • Run it only once. If you run it again, the already-renamed files are renumbered, and you can get duplicate-name errors.
  • Renaming cannot be undone automatically. Keep rename_log.csv if you may need the original names later.
  • Already ran Option A by mistake? Check that your originals are still in the main folder, delete the SORTED folder, and empty the Recycle Bin if you deleted it from Explorer — the space isn't freed until then. Then use Option B.
  • Not sure? Back up the folder to an external drive first, or use Option A.

Generate the Command for Your Own Folder

Paste your folder path below, choose the option you want, and the tool builds the PowerShell command for you.

Paste a folder path above to generate the command...

A More Accurate Option: Reading Real Capture Metadata

The scripts above sort 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 files are sorted (in the SORTED folder for Option A, or in the original folder for Option B), 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

  1. Choose your method: Option A copies files into a new SORTED folder (safest, but needs extra disk space); Option B renames files in place (no duplicates, no extra space).
  2. For Option B, run the -WhatIf preview first, then the real rename once, and keep rename_log.csv as a record of the original names.
  3. Open Shotcut and use View → Playlist rather than Open File for large batches.
  4. 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, and, if you choose Option B, no duplicate files eating up your disk.

Watch the Final Result

Here's the finished video, edited from the sorted footage described above:

No comments:

Post a Comment

test

✈️ Flight Deals

Error fares & cheap flights — updated daily

Loading flight deals…

facebook

Featured Post

Kebab castellano valladolid

Last 30 days' visitors

AI Advisor
AI Advisor ❌

Look what is published:

Try Desktop
Purchase from

chat

Ask a Question

Enhance Your Success with Increased Visitor Engagement!
Ready to leave your mark? Partner with us and witness your business flourish!

7 Days-Popular Articles


How to Find Articles Relevant to Your Interest.

Top Internet Search Topics.

Join Our Writing Community!

πŸš€✍️ Embrace your passion for words and turn your free time into an exciting writing adventure & earning! Collaborate with us and elevate your writing game. 🌟

πŸš€✍️ Explore the world of guest writing and enjoy the added bonus of a backlink to your blog. Let's create captivating content together! 🌟

Scan QR code. Buy me a coffee.

Enjoying This Website?

Give Us Your Vote!

Follow Us on Facebook

Follow Us on Facebook

Follow Us Now!

Buy & Sell Your Video

Have an interesting video? Earn money by sharing it with us.

Learn a Language for Travel, PR, or Citizenship

Offer Your Own Language
-------------------------
See More. Do More. Share More.
Join Our Newsletter

Get exclusive discounts & travel tips straight to your inbox.

Please type this word to confirm you're human:

© Latestfoto.com — Questions. Curiosity. Discoveries.