I have the same problem (pull out a folded shirt and it smells like an old house). Tried those 'odor-eaters' one hangs in closet, coffee grounds, etc. I have a walk-in closet. I put one of those small fans in there on the floor at the back pointed towards the door - leave it on during the day with door open. If you don't have nearby elec. outlet, they do have battery-powered ones. Not sure if this will get rid of the smell of my clothes (as I just thought of this). If it doesn't I will wash them and then see how it works.
First you have to find the source of the smell. Is it something like damp clothes that has now gone? Or is it still in the carpet or some moisture in the wall? If the source still exists then I would deal with that first.
If the source of the musty smell has gone I would try a dish of white vinegar, or sprinkling some baking soda. These should get rid of the smell if you leave them in there for a few days. You could also try replacing the smell with something stronger like coffee beans or orange peel. Leave them in a bowl in there and see if those work. And there are a bunch of commercially made musty smell eliminators if all else fails.
3 -5 charcoal briquets...NOT the treated ones. Put in a small cotton or muslin bag and hang, or place on an out-of-the-way shelf. If it's something that needs cleaning, you should first wash down the entire closet with a 1/2 water to 1/2 bleach solution, wipe down well and let dry. If that does not resolve the odor, use an odor-killing primer and pain--I found a link:
Cedar balls ...I purchased at Bed Bath & Beyond. Took a couple of weeks in an only wardrobe and all musty smells are gone! Good Luck
Activated charcoal granulated get at aquarium or pond strores,hardware store or online Amazon has sachets for sale. Specially for odor removal in ponds,tanks works anywhere. best odor absorber you can buy. Any compressed cooking charcoal not same
I would use a odor blocking primer. A room in our house was smoked in by the previous owners. Even after 20+ years and multiple coats of paint, during really humid weather the smell was still faintly there. A friend suggested Zinsser odor killing primer. I painted the walls and ceiling with it. It goes on white and dries clear. Worked like a charm. Paint the walls ceiling and floor of your closet and that should stop the smell.