Measure the size of the sliding doors with the track system. The package should say how big the door frame needs to be, but it is a good idea to double-check before you build the doorway. Measure the size of the wall frame to be built for the doors. You need the length of the wall and the distance from the floor to the ceiling then subtract 4 inches for the stud pieces.
Cut 2-by-4s with a circular saw for the frame pieces. You will need two pieces that are the length of the wall for the top and bottom of the wall frame. You will need enough stud pieces so they are spaced every 16 inches across the length of the wall, except where the sliding doors will be. You will need one piece the length of the space for the door frame, and you will need enough 2-by-4s that measure the difference between the top of the door frame and the ceiling less 4 inches spaced every 16 inches along the length of the door frame.
Build the wall frame by laying out the length pieces, which will be the top and bottom of the wall frame, and two of the stud pieces to form a square. The 4-inch side of wood will go flush against the floor and ceiling when you complete the frame. Use two nails per each end of the stud and nail the studs into place. Make sure the corners are square then nail the remaining studs into place every 16 inches and leave a space where the doors will go. Nail two studs into place at each end of the door frame. Nail the piece for the door frame in place at the correct height then nail the shorter stud pieces into place along the top of the closet door frame. This holds the door frame in place.
Put the wall up. Nail it into the floor and ceiling joists on either side of each stud. If you are attaching the wall frame to an existing wall, you need to attach it to a stud, which you can locate with a stud finder. Nail it into place every 18 inches from floor to ceiling. Use a handsaw to cut out the piece of the wall frame where the closet doors will go after you have nailed the wall frame into place. Paint the door frame.
Install the track for the sliding doors by screwing the bottom strip and the top strip into place. Measure and mark where you need to screw the frame into place so that the tracks line up. Place the doors inside the tracks after you have finished the walls for the closet.