Skip to main content

We’d like to load Google’s advertising tag to measure how our ads perform. It sets cookies and is optional. Privacy policy.

Mudry
Guides

How to rename photos by date taken on Windows

Rename photos by date taken on Windows with PowerRename, ExifTool or PowerShell — using the EXIF date from the camera, not the file date that changes on copy.

Roman Modrytskyi12 min read

Written by the team building Quick File Organizer, folders that organize themselves, by your rules.


To rename photos by date taken on Windows, you need a tool that reads the EXIF "Date taken" stored inside each image: PowerToys PowerRename (version 0.96 or newer), the free ExifTool command-line program, or a short PowerShell script. File Explorer's own rename cannot do it — it only numbers files.

The part that goes wrong is not the renaming. It is picking the right date. This guide shows all three methods, a name format that sorts correctly, and what to do with the photos that have no date taken at all.

Which date "date taken" really is

Windows keeps several dates for every photo, and only one of them is the moment you pressed the shutter.

DateStored whereSurvives copying?
Date taken (EXIF DateTimeOriginal)Inside the image, written by the camera or phoneYes
Date createdThe file systemNo — copying creates the file fresh
Date modifiedThe file systemUsually, but editing or rotating changes it

Copy a photo library to a new drive, restore it from a backup, or download it from a cloud service, and the file system dates can all become the same day. The EXIF date travels inside the file, so it is the one to rename by.

Check what your photos actually have

Before choosing a method, see how many files carry a date taken:

  1. Open the folder in File Explorer and switch to View → Details.
  2. Right-click any column header and choose More….
  3. Tick Date taken and click OK.
  4. Sort by the new column.

Blank rows are files without EXIF dates. Screenshots never have one. Images saved from a browser rarely do, and messaging apps often strip it when they send a photo. Knowing the size of that pile now saves surprises later.

Choose a name format that sorts

The format that works everywhere is:

2024-08-17_143022.jpg

Year, month, day, then hours, minutes and seconds. Because every part is zero-padded and runs from largest to smallest, sorting by name puts the photos in the order they were taken — in File Explorer, on a phone, in a backup drive, anywhere. That is the same reasoning behind the date-first file naming convention.

Two rules to keep:

  • No colons. EXIF stores times as 14:30:22, but Windows does not allow : in file names. Every method below removes them.
  • Plan for duplicates. A burst of shots or two cameras at the same event can produce several photos in the same second. Each method below adds a counter so no file is skipped or overwritten.

If you want a word after the date — 2024-08-17_143022_Lisbon.jpg — add it in the same pass rather than renaming twice.

Method 1: rename photos by date taken with PowerRename

PowerToys is Microsoft's free add-on for Windows 10 and 11. Its PowerRename tool gained photo metadata support in version 0.96 (November 2025), including variables for every part of the date taken. If you installed PowerToys earlier, update it first from PowerToys Settings → General → Check for updates.

  1. Select the photos

    In File Explorer, select the images, right-click and choose Rename with PowerRename. On Windows 11 it may sit under Show more options.

  2. Match the whole old name

    Tick Use regular expressions, type .* in the search box, and set Apply to to Filename only so the extension is left alone. Leave Match all occurrences unticked.

  3. Switch Replace with to photo metadata

    PowerRename lists the metadata patterns in the tooltip next to the Replace with box once you choose the metadata option there.

  4. Type the date pattern

    Enter $DATE_TAKEN_YYYY-$DATE_TAKEN_MM-$DATE_TAKEN_DD_$DATE_TAKEN_HH$DATE_TAKEN_mm$DATE_TAKEN_SS_${padding=4} and tick Enumerate items so the counter at the end works.

  5. Read the preview, then Apply

    The right-hand column shows every new name. Scroll the whole list before clicking Apply.

Mind the letter case: $DATE_TAKEN_MM is the month and $DATE_TAKEN_mm is the minute. Mixing them up gives you names that look plausible and sort wrongly.

The ${padding=4} counter is there to guarantee unique names. It numbers the selection in order — 0000, 0001, 0002 — so two photos from the same second can never collide. If you would rather not have it, remove it, but then check the preview for burst shots.

PowerRename's documentation does not list which image formats it reads metadata from, or what it does when a photo has none. Check the preview for rows where the date part is missing — usually screenshots and HEIC files from iPhones — and deselect them before applying. A completed rename can be undone with Ctrl+Z in File Explorer straight afterwards, but do not rely on that for thousands of files.

Method 2: rename photos by date taken with ExifTool

For large or mixed libraries, ExifTool is the most reliable way to rename photos by date taken. ExifTool is a free command-line program that reads metadata from almost every photo and video format, HEIC and camera RAW files included. It is the tool most photo software uses under the hood. Download the Windows package from its website and follow the install notes there.

Dry run first

ExifTool has a built-in preview: write to TestName instead of FileName and it prints what it would do without changing anything.

exiftool "-TestName<DateTimeOriginal" -d "%Y-%m-%d_%H%M%S%%-c.%%e" "C:\Photos\To rename"

Read the output. Each line shows the old name and the new one. Files without a DateTimeOriginal tag are reported and left alone.

Then rename

Change TestName to FileName:

exiftool "-FileName<DateTimeOriginal" -d "%Y-%m-%d_%H%M%S%%-c.%%e" "C:\Photos\To rename"

What the format string does:

  • %Y-%m-%d_%H%M%S builds the date and time
  • %%-c adds -1, -2 and so on only when a name is already taken
  • %%e keeps the original extension

Add -r before the folder path to include subfolders. Use double quotes, not single quotes — Command Prompt does not treat single quotes as quotes.

A fallback for photos without a date taken

ExifTool can try several dates in order. When you assign FileName more than once, the last one that exists wins:

exiftool "-FileName<FileModifyDate" "-FileName<CreateDate" "-FileName<DateTimeOriginal" -d "%Y-%m-%d_%H%M%S%%-c.%%e" "C:\Photos\To rename"

This uses the date taken where it exists, falls back to the EXIF create date, and only then to the file's modified date. It is convenient, but be honest with yourself about what it means: some names will then reflect when a file was copied, not when it was taken. Running the TestName version first and redirecting it to a text file (> preview.txt) shows exactly which files fell through.

Method 3: rename photos by date taken with PowerShell (JPEG)

If you cannot install anything, Windows PowerShell can read the EXIF date from JPEG files itself. This script renames to YYYY-MM-DD_HHMMSS, adds a counter on collisions, skips files without a date, and — as written — changes nothing, because of -WhatIf at the end.

Add-Type -AssemblyName System.Drawing
$folder = "C:\Photos\To rename"
$culture = [Globalization.CultureInfo]::InvariantCulture

Get-ChildItem "$folder\*" -Include *.jpg, *.jpeg | ForEach-Object {
  $img = [System.Drawing.Image]::FromFile($_.FullName)
  try {
    $prop = $img.PropertyItems | Where-Object Id -eq 36867
    $raw = if ($prop) { [Text.Encoding]::ASCII.GetString($prop.Value).Trim([char]0) }
  } finally { $img.Dispose() }

  $taken = [datetime]::MinValue
  if (-not $raw -or -not [datetime]::TryParseExact($raw, 'yyyy:MM:dd HH:mm:ss',
      $culture, 'None', [ref]$taken)) {
    Write-Host "No date taken: $($_.Name)"; return
  }

  $base = $taken.ToString('yyyy-MM-dd_HHmmss')
  $ext  = $_.Extension.ToLower()
  $new  = "$base$ext"
  if ($_.Name -eq $new) { return }
  $n = 1
  while (Test-Path (Join-Path $_.DirectoryName $new)) { $new = "$base-$n$ext"; $n++ }
  Rename-Item $_.FullName -NewName $new -WhatIf
}

Tag 36867 is EXIF DateTimeOriginal. Run the script in Windows PowerShell, read the "What if" lines, then delete -WhatIf and run it again. If you have not run scripts before, moving files with PowerShell covers execution policy and the habits that keep scripts safe.

The limits are real: System.Drawing reads JPEG but not HEIC, and the collision check only works on the real run, not the dry run. For iPhone photos or a mixed library, use ExifTool.

What can go wrong

The camera clock was wrong

EXIF records whatever time the camera thought it was. A camera never set after a battery change, or one still on home time during a trip, produces dates that are consistently off. Rename first and the error is baked into every name. Compare a few photos against something you know — a dated ticket, a phone photo from the same moment — before renaming. ExifTool can shift the stored dates by a fixed amount; its documentation covers the -AllDates option.

Messenger and cloud downloads have no date inside

Photos received through messaging apps often arrive with the EXIF data removed, so there is nothing to read. Cloud exports can keep the original date in a separate sidecar file rather than in the image, which tools that read only EXIF will not see. Treat these as a separate batch with their own decision.

Videos are different

Phone videos store their recording time in different tags, and many tools, PowerRename included, are built around photos. ExifTool can rename videos from CreateDate, but check the time zone in the preview: some phones store video times in UTC, so a clip filmed at 9 pm can come out an hour or more off.

Photo apps, slideshow projects and documents that link to images by path will lose track of renamed files. Rename before importing photos into a library app, not after.

Duplicates hide behind new names

Renaming does not remove duplicates; it just gives two copies of the same photo names like 2024-08-17_143022.jpg and 2024-08-17_143022-1.jpg. That actually makes them easy to spot, and finding duplicate files safely covers what to do next.

Before you rename photos by date taken, check this

  1. Copy the folder

    Renaming has no Recycle Bin. A copy costs some disk space for an afternoon and removes every risk in this guide.

  2. Count the blanks

    Use the Date taken column in File Explorer to see how many files have no EXIF date, and decide what happens to them before you start.

  3. Preview the whole list

    PowerRename's preview column, ExifTool's TestName, PowerShell's -WhatIf. Every method has one. Read it all, not the first screen.

  4. Spot-check after

    Open five renamed photos from different years and confirm the name matches what the picture shows.

Names sort, folders scale

When you rename photos by date taken, you fix the order inside a folder. They do not fix a folder with twelve thousand photos in it. Once the names are right, the next step most people want is Year and Month folders, which organizing photos by date into folders walks through.

Quick File Organizer does not rename files, but it does handle that second step: a photo rule can send images into {Year}\{Month} folders, and with Pro it keeps doing it for every new photo that lands in a watched folder.

For other renaming jobs that are not about dates, see how to batch rename files on Windows.

Common questions

Can File Explorer rename photos by date taken?

No. Selecting files and pressing F2 gives them one name with numbers in brackets. You can sort by Date taken first so the numbers follow shooting order, but the date itself will not appear in the names.

Does the Windows Photos app rename files?

It shows photos grouped by date but does not rename files on disk. The names in the folder stay exactly as they were.

Will renaming change the date taken?

No. The EXIF date lives inside the image, and renaming only changes the name in the file system. The file's modified date stays the same too.

Why do some iPhone photos not get renamed?

iPhones save photos as HEIC by default. Not every tool reads HEIC metadata — the PowerShell script above does not, for example. ExifTool does. Alternatively, set the iPhone to transfer photos as JPEG when copying them to a PC.

Can I put the date at the end instead of the start?

You can, but then sorting by name sorts by whatever comes first. Date first is what makes a folder fall into chronological order on its own.

Was this useful?

Quick File Organizer

Folders that organize themselves, by your rules. Free, no account.

See Quick File Organizer

Keep reading

Know when the next app ships

1 more Windows utility is in development. One short email when each one is ready — nothing else.

Product releases only — roughly once a month. Unsubscribe any time.