The automatic headlamps on a 2001 A6 are controlled by a module. This module sets the warning light that you are seeing in the instrument cluster when there is a fault stored in the control module. The first step is to connect an Audi compatible scan tool and check for faults. Faults can be related to things like corroded wiring, failed headlamps, failed control module, and failed level sensors. I would recommend you check the level sensors first. They are located on the front and rear lower control arms on the driver side of the vehicle. The sensors can get damaged easily.
After the diagnosis and repair, a scan tool will be needed to carry out basic settings. This teaches the control module the position of the headlights.
I hope this helps.