The Apple Dumpling Gang is a 1975 American Western comedy film directed by Norman Tokar and starring Don Knotts, Tim Conway, and Harry Morgan. The film follows two orphaned brothers who are taken in by a bank robber and his gang. Along the way, they discover a hidden gold
From Wikipedia
The Apple Dumpling Gang is a 1971 novel by Jack Bickham, about a group of orphaned children during the California gold rush. They encounter a gambler who reluctantly helps them, as well as a pair of hapless robbers who are after the gold the children have found.