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

  • \$\begingroup\$ Which operating system do you use? \$\endgroup\$
    – Matt
    Commented Feb 15, 2021 at 8:36
  • 3
    \$\begingroup\$ Also this might be better suited for softwarerecs.stackexchange.com as this is almost unrelated to photography as filenames and modification dates are file system properties. \$\endgroup\$
    – Matt
    Commented Feb 15, 2021 at 8:40
  • 1
    \$\begingroup\$ Date modified will change every time a file is… modified. Much more reliable would be date created - though that will still fail if you save out as PSD from RAW, etc. Personally I file by having the folder dated, followed by the event that folder relates to. keeps everything organised with no need to mess with individual names. \$\endgroup\$
    – Tetsujin
    Commented Feb 15, 2021 at 13:02
  • 1
    \$\begingroup\$ @RodrigoMiyamoto You need to use a tool that understands Exif. Then the timestamp would be when the photo was taken. \$\endgroup\$
    – xiota
    Commented Feb 16, 2021 at 23:02
  • 1
    \$\begingroup\$ I’m voting to close this question because it's about file handling/naming, not photography, and is better suited to a software or programming stack. \$\endgroup\$
    – inkista
    Commented Feb 21, 2021 at 4:30

2 Answers 2


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)
< DSCF0021
> 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.


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:

  • \$\begingroup\$ But it is possible to do the check that I want in XnView? \$\endgroup\$ Commented Feb 16, 2021 at 12:48
  • \$\begingroup\$ Of course, you can see new names BEFORE you will rename photos. \$\endgroup\$
    – Mobyty
    Commented Feb 16, 2021 at 18:11
  • \$\begingroup\$ Actually, the problem is that I have to see all the original names one by one to check if the order given by them is the same as the order given by date modified or EXIF. The solution that I've found is to work with some package like exifr in R that can give me the flexibility that I wanted. \$\endgroup\$ Commented Feb 18, 2021 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.