Most scanners and digital cameras have driver support that implements a special protocol for exchanging images. This protocol is known as twain. REXX Twain is an add-on DLL (RxTwain.dll) containing functions a script can call to download images from scanners, digital cameras, or any other device with twain support.
REXX Twain can be downloaded from the REXX User's Page.