Evey time I bat crawling on the ground while birds dash along easilly I have to wonder if this is the primary reason birds are so much more common. If bats had greater ground mobility would they be the dominant flyers? If pteradactyls had it would they possibly not have gone extinct?
I wouldn’t think so. Bats are well-adapted to their lifestyle, birds to their various lifestyles.
Consider seals and fish - seals have better land mobility, but fish are more numerous.
The conceptual mistake here is something like seeing natural selection as a competition between species, with winners and losers, the losers lagging behind and eventually becoming extinct. But in general this is not how it works - natural selection takes the form of competition between individuals of the same species, with other species forming part of the environment.
Also, keep in mind bats evolved much later than birds. By the time bats came on the scene, birds had taken over pretty much every aerial niche available. There are few nocturnal birds, so bats were able to fill that role. If something happened to wipe out, say, songbirds, it’s not impossible that bats would evolve to inhabit daytime roles before other birds got to it.
This isn’t quite an appropriate analogy as fish don’t need any land mobility because they don’t need to leave the water but both birds and bats have to land sometime.
For one thing, birds have been around longer (by ~70-80 million years). This rather gives them the edge in the “flying vertebrate” arena. This also gives them more time for diversification.
On the other hand, bats represent something like 25% of all mammal species. Bats may not be absolutely more numerous than birds, but there are a whole mess of 'em just the same.
As for the ground mobility of pterosaurs (Pterodactylus, aka “pterodactyls”, was but one genus of pterosaur), there is some debate as to their locomatory abilities while on the ground. As such, even if it turns out to be the case that they had a bird-like gait, they still went extinct with the (non-avian) dinosaurs. So, no, that aspect probably had little effect one way or the other on their overall success (and eventual fate).