Sunday, June 10, 2007
by Nik Kalyani
Sunday, June 10, 2007 11:25:34 AM (Pacific Standard Time, UTC-08:00)

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 <path to rename>

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)
#    Comments [0] - Trackback    

Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, i, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 204
This Year: 22
This Month: 0
This Week: 0
Comments: 231
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008
Nik Kalyani
Sign In
All Content © 2008, Nik Kalyani