Get the envelop of DWG

Hello ... i'm new to this community. Using the API, is it possible to create a tool that willl in batch mode and will extract the enveloppe of each DWG files that it will find in a floder ? (enveloppe = bounding box = 4 corners). Thank you