Slide the door closed as far as it will go. Watch along the top track and along the bottom of the door to determine if something is stopping the door from closing.
Lubricate the hinges on the closet door using a household lubricant available at home improvement stores. Slide the door back and forth on its track to help work the lubricant into the hinges.
Move any items inside of the closet that impede the free movement of the folding doors. Items along the floor are most common but look on the shelf to ensure nothing is sticking out and in the way.
Open and close the door again to see if the problem is resolved.
Check the bottom door brackets to ensure they are tight. Secure screws tightly if any of them are loose.
Drill a new hole in either the wall or floor if the old screws aren't in good condition so the door has a tight connection to the wall.
Loosen the setscrew on the top pivot bracket, which is located along the top track of the door. Slide the bracket along the door frame to make the door parallel to the jamb.
Tighten the screw again to secure the bracket and door.
Cut off 1/4 to 1/2 inch of the door if it snags on the ground, preventing it from closing. Mark the line and score it with a utility knife before cutting the edge of with a circular saw.
Sand the edge and seal it before putting the door back on its track.