The result moves Scotland up to third in the Six Nations standings - for the time being at least - and next weekend they'll face a France team fresh from a big win over Ireland in Dublin.
The final scoreline at Murrafield was closer than it looked like being after 40 minutes with Scotland in a commanding lead at the break with Tom Jordan's double and scores by Blair Kinghorn and Darcy Graham putting them 28-8 ahead going into the second half.
Blair Murray responded for the visitors in the opening period, while Ben Thomas, Teddy Williams and Max Llewellyn also touched down in the second half to rescue two bonus-points,
Blair Kinghorn's second early in the second period proved vital as the Scots, once again, suffered a second-half drop-off that brought Wales back into the game.
Speaking to the BBC after the game, Scotland head coach Gregor Townsend said: "Very pleased with the start of the game and how we continued throughout the first half. We did talk at half-time about building on that lead.
"Sometimes it's difficult. The opposition, who are a quality team, can get things right. They got more ball in the second half. Sometimes changes from the bench aren't smooth. We're disappointed with not scoring when we had a couple of chances in the last five minutes, and conceding those tries.
"We've got to make sure we don't give them [France] momentum, any easy opportunities to get on the ball. They're so dangerous off counter attack or if you make an error, they usually score on the back of it. They're very strong in the forwards with their pick-and-go game and set piece.
"They've been outstanding in every game so far in the Six Nations and could have scored a few more at Twickenham. It's our biggest challenge.
"With the learnings we've had this year and how we played to start that game, we can really give it a crack next week."