are you saying you want to re-point the file texture for JUST the SELECTED objects? I'm no expert on shaders but I think this will mean you having to assign a NEW material, if you don't want every texture to change... is this what you want? cos that would get quite messy quite quickly.. I think.. although it could be done quite easily...
anyway, the 4 lines below will list every file texture connected to the selected object(s) (into the variable array "$files"):
string $sel[] = ls -l -sl -tr
;
string $shader[] = listHistory -f 1 $sel
;
string $history[] = listHistory $shader
;
string $files[] = ls -type "file" $history
;
be aware though that there is some weird "bug" in Maya that allows multiple shaders to be connected to an object even though they are not visible on any of it's faces... anyone know what that's all about...?
:nathaN