
We will use the command tree again to compare our original filenames in OldImages for new in RenamedImages … RenamedImages the relative path to the folder where all your images will be renamed. To rename all image files in the original folder, do not specify any extensions.

%H%M%S adds hours, minutes and seconds of creation time.

_ Places an underscore before the second part of the filename.%y%m%d_%H%M%S%%-c.%%le used to define the format to use when renaming the file:% r% m% d_ means the first part of the new file name will be the last two digits of the creation year, month and day.-d means it sets the data format for time values.-filename

The following command renames all “CR2” (Canon) source files in the current folder and its subfolders according to the metadata: Create date and time. Renaming image files according to their creation date We can see the images moved to a new folder with year, and then to a subfolder yearMonth. We will use the command tree to see the folder structure of the new image layout we were operating on. OldImages source folder where the whole operation starts and the original images are saved. -r repeats the process recursively through the original folder and subfolders.NewImages/%y/%y%m the relative path to the image folders to be copied from the subfolders of the year name followed by yearMonth.

