The relative abundance of the three decay modes Bd→D−K+, Bd→D−π+ and Bs→Ds−π+ produced in 7 TeV pp collisions at the LHC is determined from data corresponding to an integrated luminosity of 35 pb−1. The branching fraction of Bd→D−K+ is found to be B(Bd→D−K+)=(2.01±0.18stat±0.14syst)×10−4. The ratio of fragmentation fractions \fsfdt is determined through the relative abundance of Bs→Ds−π+ to Bd→D−K+ and Bd→D−π+, leading to fs/fd=0.253±0.017±0.017±0.020, where the uncertainties are statistical, systematic, and theoretical respectively.