Script for maps & objects

Hi to all!
I have a it possible with max script to make one who will make a .txt file with all the objects in the scene and maps applied on them? Something like the archive function - it make a .txt file with the maps path. I want to make something like this but only with the name of maps and name of the objects with that map. And if it possible can anyone to show me something close to this, or to tell me which functions and options to use to make that script. Thanks you.