It might be a good way to deal with weeds, depending on what plant you're dealing with, and what the carpet is made of.
Dealing with the carpet first:
- If the carpet is natural fiber, then it can do well as the bottom layer of a sheet mulch, which is basically what you're proposing (you're talking about two layers instead of 4). In this case, make sure you cut the weeds as low as possible -- you don't want them to try to regrow once you've covered them. Since the carpet fibers are natural, they will break down over time. The pine bark will also slowly decompose. You will want to renew the upper layer regularly to keep weeds controlled.
- If the carpet is petroleum based (e.g. plastic backing), think twice before putting it on your soil. It will take a long time to break down, and may contaminate your soil with chemicals that are hard to get rid of later on.
And then thinking about plant type:
- If the weeds in question are "simple" annual or perennial weeds (e.g. dandelion, crabgrass) that spread by seed (i.e. they don't have spreading roots / "creepers"), then this control strategy should work well.
- But if they spread via the roots (e.g. creeping charlie, leafy spurge) then they will probably just spread underneath your barrier until they poke out one of the boundaries of the carpet. In this case, you will have moved the problem, which may be all you need -- to keep it away from your trees -- but it could cause other problems, depending on where the weeds migrate.
So before you go to all the effort of laying down the carpet and spreading bark mulch, you should identify what kind of weeds you are dealing with.