(define (script-fu-batch-resize)
  (let* (
          (sourcePath "D:\\Personal\\Pictures\\Wallpapers\\Unprocessed")
          (destPath "D:\\Personal\\Pictures\\Wallpapers\\Unprocessed\\resized")
          (filelist (cadr (file-glob (string-append sourcePath "\\*.*") 1)))
        )
        (while (not (null? filelist))
          (let* (
                  (filename (car filelist))
                  (image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
                )
              (gimp-image-convert-color-profile-from-file image "file:\\\D:\\Personal\\Pictures\\Wallpapers\\Unprocessed\\test\\test.icm" 1 FALSE)
              (file-png-save RUN-NONINTERACTIVE image (car (gimp-image-get-active-drawable image)) "test.png" "test.png" 0 9 0 0 0 1 1)
              (gimp-image-delete image)
           )
           (set! filelist (cdr filelist))
         )
  )
)
(script-fu-register
  "script-fu-batch-resize"                        ;func name
  "Text Box"                                  ;menu label
  "Creates a simple text box, sized to fit\
    around the user's choice of text,\
    font, font size, and color."              ;description
  "Michael Terry"                             ;author
  "copyright 1997, Michael Terry;\
    2009, the GIMP Documentation Team"        ;copyright notice
  "October 27, 1997"                          ;date created
  ""                     ;image type that the script works on
)