|:: append seq num to JPGs|
for /f "tokens=* delims= " %%a in ('dir/b/a-d/od *.jpg') do (
set /a COUNT+=1
REN %%a CIMG_!COUNT!.JPG
 If by -D you want to exclude directories, use /a-d
 If you want reverse date order, use /o-d
 No need to initialize COUNT, unless you want to start at 0; this starts at 1.
 If run more than once, this will 'double append' the COUNT. If you need
a second run to include files added, you can use additional code to make it
'take up where it left off'.
If at first you don't succeed, you're about average.