The other day I needed to resize a few dozen images. I was using someone elses laptop and as I didn’t have Photoshop to hand I had to improvise. I had already downloaded GIMP and used it (for the first time) to do some simple cropping and cloning, and so decided to look into creating a script in much the same way as I would have used an action in PS. After a bit of reading online I discovered that the performance of GIMP scripting in Windows was less than ideal and came across another Wordpress blog that mentioned ImageMagick, which is free and allows image manipulation from the command line.
The mentioned blog entry contained a batch operation, which will convert all images in a specified directory. I have improved this command for use with files that contain spaces (as mine did).
for /f "tokens=*" delims= " %i in ('dir /b *.jpg') do convert "%i" -resize 50% "%i"
Note that if you are using the above in a batch file, variable names are indicated using double percent symbols (%%) instead of just one.