Uncategorized

Bulk Renaming of Photo Files

June 10, 2007

author:

Bulk Renaming of Photo Files

When importing photos from a digital camera or phone, the Windows import wizard allows me to give all the files a more descriptive name than “DSC10011.jpg.” The problem I run into all the time is that I don’t import photos more than once a week and this makes a common filename prefix pretty useless since the imported sets may contain multiple events.

Although it has bugged me to no end, until today I left this at the default and organized files manually into more descriptive folder names. Today I decided to fix this annoyance. I briefly checked out BatchPhoto and a couple of other utilities and concluded that they were all overkill. So I wrote a quick console app to take care of this problem.

FileNamer (not feeling very creative today, hence the lame name) is a very simple app that will accept one parameter — a local or UNC path. It will then recurse every folder at that path and rename most photo and movie files (*.jpg;*.jpeg;*.mpg;*.mpeg;*.avi;*.wmv;*.mov) with the same name as the parent folder followed by a numeric serial number. If your photos are in C:\Docs\Picnic, the photos in this folder would be renamed to Picnic 0000.jpg, Picnic 0001.jpg etc.

The program has very limited error handling and I have no idea what happens when there are more than 10,000 files present (you should not have that many files in the same folder anyway). You will need .Net 2.0 to run the app. No installation is needed — just copy FileNamer.exe to a location of your choice, fire up a command window and type:

FileNamer

The zip has the source which you can ignore if you don’t intend to modify. Use the program at your own risk and be sure to test it with some junk files first.

 

FileNamer Source.zip (5.43 KB)

Founder NftyDreams; founder Decentology; co-founder DNN Software; educator; Open Source proponent; Microsoft MVP; tech geek; creative thinker; husband; dad. Personal blog: http://www.kalyani.com. Twitter: @techbubble
Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.