Renaming lots of images quickly

This isn't really a project, but it's been a problem that's bugged me for a while. When I download lots of pictures from my camera, how can I rename them all to something more suitable than IMG_0564.

I like to give my camera pictures a descriptive name followed by a number if it's one of a set. I've wasted a lot of time in the past renaming them all by hand. This morning I finally got round to working out a better and much quicker way.

There will be lots of ways to do this, but I've wanted to try a language called Powershell for a while. Powershell is an extension to Windows and is like DOS, but with knobs on.

Just like DOS, it's all done from a command prompt. It took me a little while to get the hang of, but I finally came up with the following line of Powershell code that did just what I wanted it to.

ls *.jpg |sort-object creationtime | %{$i=1} {Rename-Item $_ -NewName "Nice-picture_$i.jpg"; $i++ }

When I get time I want to play about with adding my own function and turn this rename thing into a nice easy to use function. Powershell offers lots of ways to make file management easier. I'll play about with this as problems pose themselves.

If you want to try Powershell you can get it from here:

Update: I've found an easier and less geeky way to do this. I've just discovered a really good batch image renaming feature in Adobe Bridge. It's easier to do it with a nice UI, but the Adobe suite is expensive and I wouldn't buy it just for this.

Dad said

Would you recommend Adobe Bridge to me to use or could I use your little program?

Richard Garside said

Dad, if you have the Adobe suite then you're probably better off using Adobe Bridge. The UI is nicer than using the command line.