its hard to say whether or not u can beat an infection off, but surely you can shorten the duration of it. if you are growing tons of pseudo or cepacia, or what have u, you probably won't be able to beat that w exercise alone. but, at the end of your tuneup, if did incorporate exercise your pfts would definitely be higher. thus cleaning your lungs out much better and buying lots more time till your next tune up was needed.
research the benefits of exercise on the immune system. its amazing. the good hormones that exercise produces helps fight off colds and infections. also the right exercises strengthen all the muscles around the rib cage which help our breathing, and even our pfts.
if you look at some of the longest lived cfers...most of them were runners or athletes of some sort. that alone gives me motivation to keep going.
i was surprised to learn that you don't have to stop exercising while sick either. its good to keep going.
if you haven't started a program yet, its good to start slow and build up. lifestyle changes like walking in stead of using elevator, ect..things like that are great. but what will really build stamina and pfts is continuous 'real' exercise that goes on for 45 mins or more.