Only 10 percent of carpenter ants leave their nests, spraying the ones you see will not help. To get rid of them, you must locate the nests and destroy them.

Carpenter ants use scent trails between the parent nest and the satellite nests and to find food. This trailing behavior can be used to help you find their nests. Sawdust type debris can be found that has fallen out of the galleries through cracks and holes. There may also be dead ants and bits of insects they have eaten.
Since the ants like moist wood, you would need to look around sinks and bathtubs, window or door frames that are not sealed properly, and behind dishwashers, to name a few. You could also tap the baseboard to listen for a hollow sound indicating damaged wood, or the ants may respond with a rustling sound. Outside, look in dead or living trees, tree stumps, and any landscaping decor made of wood. Sometimes, you may see a swarm of the winged carpenter ants, which may help you locate a nest.
If a nest is found outside your home, it can be destroyed by breaking it apart and dousing it with hot water or hot water and ant killer. It is also helpful to treat the outside of your home with a pesticide and clear away extra brush and debris.
If you find a nest in your home, you can spray pesticides into the entrance of the nest and place baits with boric acid near the nest. This will probably only work on a small colony especially since the spray will probably not reach all the way into the colony. A way to get all the way into the nest is to drill a hole into the wall and the nest, then spray and/or dust with pesticide.
If you don’t feel like tackling such a big and messy job, then an option for you is to call in the professionals. You should probably have an initial inspection to see how bad the problem is, then a second trip by the exterminator to treat the nest or nests. This will entail boring holes, treating the nests, and will probably finish with a treatment on the exterior of your home. After a month or so, another inspection will be performed to see if they are gone for good.
There are some things to be done that will help prevent carpenter ants. Taking care of your lawn by removing tree stumps, clearing debris, placing wood piles away from your home, keeping the grass mowed, and making sure the wood of the walls of your home doesn’t come into contact with the soil will help keep the ants away.
White gravel is useful as a barrier between the house and the adjacent soil because it has a dry texture and helps water drain. Carpenter ants and some other pests like dark, moist areas so they will not be attracted to the area where the white gravel had been placed. Besides, it is also an attractive landscaping feature.
Carpenter ants are large, blackish colored ants. They vary in size between ¼ and ½ inch. They build nests in moist, dead wood. Carpenter ants will bite but they will only pinch as they have no poison or venom. If the skin is broken, wash it with soap and water and apply antibiotic ointment and a bandage.
They are often confused with termites but will actually eat termites. Carpenter ant bodies have a narrow waist and bent antennae, whereas termites are light colored, do not have a small waist, and have straight antennae. Carpenter ants are often seen out in the open, where termites avoid the light and are hardly ever seen outside of their colony. Carpenter ants hollow out smooth galleries to move between each section or the nests, but termites will pack mud into their galleries.
The main reason to get rid of these carpenter ants is the damage they can cause. Even though they prefer moist, decaying wood, they will nest in dry, healthy wood. They start with a parent colony, and add satellite colonies when their numbers increase. If you want to know the answer to “How do I get rid of carpenter ants?” you need to learn about their habits to make it easier to find their nests.