;I have copied this script to ~/.gimp-2.8/scripts/
; And I'm running this script by the following command
; gimp-console -b '(batch-drop-shadow "*.png" 0.1 0.1 0.1)' -b '(gimp-quit 0)'

(define (batch-roundcorner-dropshadow pattern
offsetxfrac
offsetyfrac
radiusfrac)
(let* ((filelist (cadr (file-glob pattern 1))))
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image)))
(imgwidth (car (gimp-image-width image)))
(imgheight (car (gimp-image-height image)))
(offsetx 1.0)(offsety 1.0)(radius 1.0)
)
; Now the actual calculation of input parameters
(set! offsetx (* imgwidth offsetxfrac))
(set! offsety (* imgheight offsetyfrac))
(set! radius (* imgheight radiusfrac))
(plug-in-cartoon RUN-NONINTERACTIVE image drawable 3.0 0.1) 
; Calling the round-coners script here.
(script-fu-round-corners image drawable radius TRUE offsetx offsety radius FALSE FALSE)

(set! drawable (car (gimp-image-merge-visible-layers image TRUE)))
(gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
(gimp-image-delete image)
)
(set! filelist (cdr filelist))
)
)
