Some times the only option is to switch off mains and test with a meter.
So standard three cables, one feed, one to switch, and one to next lamp. So with power off, multi meter or buzzer on the two wires of each cable, and flick the switch, one cable will turn buzzer or meter on ohms range on/off, so you now know the switch cable.
There are no short cuts.