I found and tweaked this some time ago for similar stuff that I only do rarely. It's not pretty, but it works for me - but only with pictures with the same number of digits at the end, and all going to the same beginning. So if you have "raw data nnn" and want "raw data 0nnn" you can only work with photos with 3 digits: move those to your "working" folder, run the batch file, then move them back.

Note: it won't work if you have different beginnings of filenames. I imagine someone can capture the initial part and reinsert it - this board is awesome that way! - but I don't do that. All my main camera's photos get JKn_xxxx treatment, with the n iterating. (I'm no longer team photographer for two kids, so I'm taking many fewer pics. But if I ever get to JK9_ I'll be in a similarly sinking boat...)

-jk


Code:
@echo off
setlocal enableextensions enabledelayedexpansion
rem iterate over all jpg files:
for %%f in (*.jpg) do (
    rem store file name without extension
    set FileName=%%~nf
    rem Trim to only x digits, from the end (just replace numeral for the number of digits at end of photo)
    set FileName=!FileName:~-4!
    rem Add "JK4_" and extension again (I replace the headers with JKn_; add JKn_0 to pad)
    set FileName=JK4_!FileName!%%~xf
    rem Rename the file
    rename "%%f" "!FileName!"
)