As the manual said in c_trace->scan_texture: The predefined string tex_name is set to the texture name of the surface hit by the ray, or the entity file name if a model, sprite, or terrain was hit.
It is the file name (xxxxxx.MDL), or you can check it in WED->entity->properties->File.