I have a group of photo files that are named with only a sequence number like: Imagexxxx.jpg (xxxx is just a sequence number) what I am trying to search but sadly no results, is to add the date of the file to the filename as the following yyyy-mm-dd-Imagexxxx.jpg.

All what I can find on the net is either replacing certain character or changing the letters case.

  • 1
    I have not used them, and can only suggest looking at the various exif tools. That extracts the internal meta-data and then you can use that to format a name for your file, change timestamps or do other edits. In Synaptic you get a variety of exif tools listed. sudo apt-get install synaptic
    – oldfred
    May 21, 2016 at 13:29

3 Answers 3


Krename is one possible tool for what you are trying to accomplish.

Install with:

sudo apt-get install krename


  1. Select the files you want to rename
  2. Choose rename input files in the destination path
  3. Enter [creationdate;yyyy-MM-dd]$ in the advanced Filename template.

If creation date (of the file) is not what you want, krename can also use exif data.


I use 'pyRenamer' to rename my photo files. A very friendly GUI software that can abstract EXIF meta-data from image file.


A slight modification of this question's answer will do it. Run this in a terminal in the directory your photos are in, changing [date] as appropriate (no brackets are needed):

for file in *; do mv "$file" "[date]$file"; done

Note that this will prepend whatever you choose for [date] to all files in that directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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