We report a measurement of the exclusive B+ meson decay to the Ds(∗)−K+π+ final state using 657×106BB pairs collected at the Υ(4S) resonance with the Belle detector at the KEKB asymmetric-energy e+e− collider. We use Ds∗−→Ds−γ and the Ds−→ϕπ−, K∗(892)0K− and KS0K− decay modes for Ds(∗) reconstruction and measure the following branching fractions: B(B+→Ds−K+π+)=(1.94−0.08+0.09(stat)−0.20+0.20(syst)±0.17(B))×10−4 and B(B+→Ds∗−K+π+)=(1.47−0.14+0.15(stat)−0.19+0.19(syst)±0.13(B))×10−4. The uncertainties are due to statistics, experimental systematic errors and uncertainties of intermediate branching fractions, respectively.