Saturday, January 31, 2009

Canon A540 camera problem

Hi there

I'd like to talk about files...

I have a camera Canon A540 and when I get files to PC, they have name like img_XXXX.jpg

this is bad name for image because there is no information in the name. It doesn't contain when and where the photo was taken.

Other problem occurs when I try to remove some small defects (red ayes for example) I am losing last modification date and then I don't know when the photo was taken

If my camera is more smart I won't have this problem

So I decided to create a console application for changing file name. And the main task was to add date, time and prefix to filename. Sure I understand that if I change filename the last file  modification date would be changed. So I add a file description to do reverse operation if there is a need.


Finally I have finished the program. It was not difficult to implement but I have no free time for that game.

So about program:

NameChanger - if you need one just mail me

You should use program with arguments:

-r - recursive search in sub-folders

-d -t - rename fonded file and insert date and time in file name

-pimg - insert prefix img in file name so all you files will start from this prefix. it is convinient when you just download photos from camera and wanted a prefix (for example: my_summer_holidays )

-ejpg - rename files only with jpg extension

-iimg - ignore files started with "img"

So in general you could use this command tool like bellow:

NameChanger.exe -d -t -r -pparty -ejpg


I have used it and noticed that some files have the same file modify date and time. In this case NameChanger add a letter to the resulted name. For example if you have three files with the same date and time then you will have 

summer_2009_06_01_13_27_10.jpg

summer_2009_06_01_13_27_10A.jpg

summer_2009_06_01_13_27_10B.jpg


2 comments:

Victor Derevyanko said...

hi
Does your camera support EXIF-standard? It should. In this case, any image created by this camera contains date/time of creation in the header. There are a lot of programs that are able to convert EXIF info to filename. For example, this one. May be it will be useful for you? Regards

Oleksander said...

Thank you Victor for the link

I know it looks like I am going to invent a bicycle but I like programming and it is easy one. I am just trying to make my life more interesting and pick up a new experience