Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
I have been planning to do a PhotoName II for some while now, and here it is. Because of the different take on this application, I also decided to change it’s name from PhotoName II to RenameImg (short for Rename Image). The main difference is that this has no graphical user interface, you use it from your text console. It takes a few clicks to install this, but when it’s done, it is easy to upgrade and you have a friend for life.
If you are planning to run RenameImg from PowerShell, you must have given yourself the right to execute scripts, and to be able to do that, you must start PowerShell as an administrator. You only have to do this once, regardless of what scripts or programs you want to run from PowerShell. If you are planning to run this from your old command prompt (cmd.exe), you don’t have to do anything.
The next thing you have to do, is to unzip the exe file and give it a suitable location on your system. Your console must be able to reach the exe file. I have created a folder on my machine where I put all my console applications and cmdlets. That folder is then pointed out in the Path system variable. This makes it easy to start the application, because all I have to do, is to type renameimg in the console. When started without any arguments, RenameImg will rename all JPG images in the current folder Just like DIR lists the files in the current folder when executed without arguemnts, RenameImg will rename the files in the current folder when started without arguments. I will talk about the supported arguments you can pass to RenameImg in a later post.
Now, if it finds any JPG images that haven’t already been renamed using RenameImg, it will list them and ask you if you want them renamed, and if you answer yes, RenameImg will rename each image to a filename that looks something like this:
The new name will consist of:
The capital letter D.
The date the image was taken according to the EXIF (YYYYMMDD).
The capital letter T.
The time of day the image was taken according the the EXIF (HHMMSS).
Up to five numeric digits from the original filename. If less than five numeric digits are available, random digits are used.
The capital letter X.
A random number (five digits).
The capital letter P if the date and time actually is taken from the EXIF. If not, the capital letter C indicates that the date is the file creation date.
Finally, before the file ending, a serial number, that is previous image’s number plus one, or a random number if the image is first in the batch (five digits).
The file ending is .jpg (lowercase).
By using this naming standard on your images, you can store all your images in one single folder on your hard drive. Also, you can use the name as the unique identifier if you are storing your images in a database. Finally, pictures are always displayed chronologically in media players and you can know when the picture is taken just by looking at the name of the file.
You can download RenameImg from here.