There's also an example (using plug-in-unsharp-mask instead of
plug-in-lens-distortion) of applying applying a filter to multiple files
in batch mode in the online documentation.
Look for the section headed "Processing several files" at
http://www.gimp.org/tutorials/Basic_Batch/ (or just hunt on that page
It's a complete example; you can copy it (substituting the lens
distortion filter for the unsharp mask filter) without really knowing
Gimp-user mailing list