I have done this on several homes over the years and always like the look. This would look really good and accent the doors plus make a nice transition for the wall to ceiling.
* baseboards and door frame- paint
* doors only and ceiling cornice- stain
Staining the bifold frame depends on how the frame is put together. Usually the base runs into any door frame trim so painting the frame and trim will eliminate the sharp color transition between paint and stain. This way the doors will be the accent framed with the painted trim- always a good look.