I've been taking notes when I see them of places that offer live music at my various destinations, but I just found this wonderful website that lists music venues in Scotland, including what/who is playing, when and where. You click on the map and then can narrow down the type of music (i.e., folk, jazz, etc.) and the day of the week. The Gig Guide: http://www.gigguide.co.uk/listings.htm
I did note that there were very few entries for a good portion of Scotland (probably from lack of people reporting) but Edinburgh and Glasgow have an abundance of listings, so it's worth checking out if you will be in either of those cities.
I've also found that many pubs and bars promote upcoming live music events on their Facebook pages, so it's worth checking out and even following them if you're interested. For example, The Clutha and Scotia Bar have FB pages that show who will be playing. I found another one in Scotland called The Old Inn in Carbost on Skye. They didn't have anything listed but I messaged them on FB, and they told me that Wednesdays and Thursdays are their live music nights. Another one I found is Sandy Bells in Edinburgh, which has traditional music nights. And a public FB group called Edinburgh Trad Music and Session Hub that is for both musicians and the public who want to hear traditional music. I doubt if everything is traditional folk music, but I like music and feel like it's worth checking out. :)