I rode a Dahon Mu XL to work and back on "Bike-To-Work Day", a total distance of 94 miles. I overshot home by 3 miles on the way back so it would be a Century. Not a sustainable form of commuting.
A few years later, I rode my then-new Tern Verge S11i on a fund-raising Century for the Leukemia and Lymphoma Society, from Highland Park, IL, to Woodstock, IL, and back. There was a fair amount of climbing. I switched out the stock pedals for a pair of SPDs so I could wear shoes with cleats, which was a great help.
A folding bike, properly set up, should be fine for reasonably long rides.