TransWikia.com

How can I rename a large set of photos using their modified date?

Photography Asked on September 5, 2021

My problem is a little bit different from the other that I’ve seen here. The thing is that I have for example: DSCF0001, DSCF0002 and so on, as filenames with modified dates 2020/01/01 , 2020/01/02 (just to simplify the example, consider that there is only one photo per day).
The problem is: sometimes, it happens that DSCF0020 has a 2020/01/21 and DSCF0021 has a 2020/01/20 date. In this case, I would like an app that:

  1. warning that the sequence in the names are not the same as the sequence in dates.
  2. give me some flexibility to rename the files and give me some options of what to do with the others.
    I’ve tried to rename my files with bulk rename utility, but I couldn’t make the program to check it for me.
    And last question, why does it happen? It’s a bit strange for me this behaviour. My guess is that the date is wrong, since in these cases the order given by the names makes much more sense.

Thank you

2 Answers

I used XnView for batch renaming. XnView is a free Image Viewer to easily open and edit your photo file. You can try to use photo`s Modified date or EXIF data (if it exists) in renaming rules.

Here my settings for renaming:

Answered by Mobyty on September 5, 2021

I'll assume that "filenames with modified dates 2020/01/01" refers to the filesystem timestamps, and not the EXIF data.

As others have and will point out, this is difficult to maintain (e.g. every time you edit the EXIF data, the file's change date will become wrong).

But if all you want is something to provide a quick check as to whether the files are consistently dated, say just before you use the timestamps to set the EXIF dates, this will do the trick.


If you have access to a bash shell and the ls command (e.g. as on Linux systems):

$ ls -ltr
-rw-rw-r-- 1 ray ray 0 Jan 19  2020 DSCF0019
-rw-rw-r-- 1 ray ray 0 Jan 20  2020 DSCF0021
-rw-rw-r-- 1 ray ray 0 Jan 21  2020 DSCF0020
-rw-rw-r-- 1 ray ray 0 Jan 22  2020 DSCF0022

$ ls
DSCF0019  DSCF0020  DSCF0021  DSCF0022

$ ls -tr
DSCF0019  DSCF0021  DSCF0020  DSCF0022

$ diff <(ls -tr) <(ls)
2d1
< DSCF0021
3a3
> DSCF0021

The ls command lists the files sorted by name.

The ls -tr command lists the files sorted by change date (-r means oldest first).

The diff command compares the two results and displays what is different.

Answered by Ray Butterworth on September 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP