Owen Lane's two tries set Wales on their way with Reuben Morgan-Williams and Phil Jones also crossing for the hosts.
Robbie Smith, Blair Kinghorn and Ben Appleson were Scotland's try scorers.
Wales begin their World Rugby Junior Championship campaign in Georgia against Australia on 31 May,
They will also face England and Samoa in Pool A, while Scotland are in Pool B with Ireland, New Zealand and Italy.
Wales Under-20s warmed up for the 2017 World Rugby Junior Championship with a 29-22 victory over Scotland at Bridgend's Brewery Field.