PicOrganizer
Back to the blog
How to Batch Rename Photos (by Date Taken) on Windows and Mac
Guides

How to Batch Rename Photos (by Date Taken) on Windows and Mac

December 8, 20265 min read

Read this article in French

Published by the team behind PicOrganizer.

Short answer: for a simple "Holiday (1), Holiday (2)" rename, select the files and press F2 in Windows File Explorer, or use Rename in the macOS Finder. To rename photos by the date they were taken, use Microsoft's free PowerRename on Windows (it reads the EXIF date taken) or the free ExifTool command line on any system. Use a pattern like 2024-07-14_153012.jpg: it sorts chronologically everywhere.

Pick a naming pattern first

A rename is only useful if the new names sort correctly and stay unique.

  • Date first, in year-month-day order: 2024-07-14 or 20240714. Alphabetical order then equals chronological order, in any file manager.
  • Add the time (_153012) so two photos from the same day don't collide.
  • Optional short description after the date: 2024-07-14_153012_kyoto.jpg.
  • Keep to letters, digits, hyphens and underscores. We avoid spaces at the start, slashes and colons in file names: they cause trouble when files move between systems.
  • Use the capture date, not the file date. The file's "created" or "modified" date changes when files are copied; the EXIF capture date (DateTimeOriginal) is written by the camera inside the photo. See EXIF data explained.

Windows: File Explorer (quick, no dates)

  1. Select the photos (Ctrl+A for the whole folder).
  2. Press F2, type a name such as Kyoto, press Enter.
  3. Every file gets that name followed by a number in parentheses: Kyoto (1).jpg, Kyoto (2).jpg...

Fast, but you can't put the capture date in the name. Ctrl+Z undoes the rename right after.

Windows: PowerRename (free, reads the date taken)

PowerRename is part of Microsoft PowerToys, a free, open source set of Windows utilities. After installing PowerToys, select files in File Explorer, right-click and choose Rename with PowerRename. You get a preview of every new name before anything changes, and an undo afterwards.

To rename by capture date:

  1. In Search for, enter .* and tick Use regular expressions (this matches the whole name).
  2. Select the EXIF/XMP metadata option in the drop-down, which unlocks patterns such as $DATE_TAKEN_YYYY, $DATE_TAKEN_MM, $DATE_TAKEN_DD, $DATE_TAKEN_HH, $DATE_TAKEN_mm, $DATE_TAKEN_SS, and others like $CAMERA_MODEL.
  3. In Replace with, enter for example: $DATE_TAKEN_YYYY-$DATE_TAKEN_MM-$DATE_TAKEN_DD-$DATE_TAKEN_HH$DATE_TAKEN_mm$DATE_TAKEN_SS
  4. Make sure Apply to: Filename only is selected so the extension is kept, check the preview, then rename.

Careful: PowerRename's other date patterns ($YYYY, $MM, $DD without DATE_TAKEN) use the file's creation date, not the capture date. For photos, you almost always want the DATE_TAKEN ones.

Mac: Finder

  1. Select the photos, Control-click one of them and choose Rename.
  2. Choose Format and set the new name format.
  3. Click Rename.

The Finder also offers Replace Text (find and replace in names) and Add Text (before or after the name). Apple's guide doesn't describe using the photo's capture date, so for date-taken names use ExifTool below.

Any system: ExifTool (free, command line)

ExifTool is free software by Phil Harvey for Windows, macOS and Unix. Its documentation gives this pattern to rename files from a date tag; here it uses the capture date, DateTimeOriginal:

exiftool -d %Y%m%d_%H%M%%-c.%%e "-filename<DateTimeOriginal" DIR
  • %Y%m%d_%H%M builds names like 20240714_1530.
  • %%-c adds a copy number (-1, -2) when two photos would get the same name; existing files are not overwritten.
  • %%e keeps the original extension.
  • Replace DIR with your folder. In a Windows batch file, every % must be doubled again.

Want seconds in the name? Use %Y%m%d_%H%M%S instead. If some files lack the tag you chose, ExifTool's documentation suggests trying another date tag, such as CreateDate or FileModifyDate (the file date, less reliable).

Other tools with batch rename

  • XnView MP (free for private use, Windows, macOS, Linux) has a batch rename tool next to its batch converter.
  • digiKam (open source) lists "Batch Rename items by advanced criteria" among its features.

Renaming vs. sorting into folders

Renaming makes files sort in order inside one folder. With thousands of photos, folders do more of the work: 2024/07 - July/ is easier to browse than 4,000 files in one place. Two approaches combine well:

  1. Sort into folders by date. PicOrganizer copies photos into Year/Month or day folders using their capture date (or the file date when a photo has none), in your browser, without uploading them. Date and format sorting are free (50 photos per sort); location and camera folders are in the Standard plan (pricing). Its sorting options can also add a prefix to every file name (Kyoto_IMG_0421.jpg), which keeps the camera's original name. It does not build date-based file names; use PowerRename or ExifTool for that.
  2. Rename inside the folders with one of the methods above.

Our guide to organizing photos by date covers the folder side in detail.

Before you press Rename

  • Test on a copy of a small folder.
  • Check that the dates are right. A camera set to the wrong time zone or year renames everything wrong. Our EXIF editor shows the capture date of any photo for free, and can fix it in JPEG files (3 free edits with a free account, unlimited on the Standard plan).
  • Keep RAW + JPEG pairs together: rename both with the same rule so 20240714_1530.CR3 still matches 20240714_1530.JPG.

FAQ

How do I rename photos by date taken on Windows? Install Microsoft PowerToys and use PowerRename with the $DATE_TAKEN_... patterns, or use ExifTool. File Explorer's F2 rename can't use dates.

How do I batch rename photos on a Mac? Select them in the Finder, Control-click, choose Rename, then Format. For capture-date names, use ExifTool.

Will renaming change the photo's EXIF date? No. The name and the EXIF metadata are separate; renaming touches only the name.

Can I undo a batch rename? In File Explorer and PowerRename, Ctrl+Z right after the rename undoes it. With ExifTool, there is no undo, which is why you test on a copy.

Read also