Measure your existing doors before shopping for new sliding wardrobe doors. You need a set that fits the opening in your room. Solid-panel doors can be trimmed to fit a smaller size, but this will not work with the less expensive hollow doors.
Lift up on one of the existing wardrobe doors, pulling the bottom of the door forward until it releases from the track. Depending on the type of door you have, you may have to release a locking switch on the rollers or pull the door out from a specific cutout portion of the track. Repeat the process to remove the other door from the track.
Remove the screws and track on the top edge of the door opening. Measure the length of the old track to determine how long the new track needs to be.
Take your measurement from step 3 and mark off the proper length of the new track. Use a hacksaw to cut the track, then secure it to the top edge of the door opening with wood screws. Be sure that the screws are tightened far enough that the heads lie flush against the inside of the track. You do not want the screw heads to catch the rollers as the sliding doors pass along the track.
Check the top of the sliding wardrobe doors to see if you need to install the rollers. Some types of doors have the top rollers pre-installed, while others require you to attach them to the inside top edge of the door.
Raise one of the wardrobe doors up and hold it so that the bottom edge angles out toward you. Set the top rollers into the top track. Be sure to flip the locking switch or align the rollers with the cutout in the track, if necessary. Let the bottom of the door swing into place until it slides into the bottom track. Repeat this process to install the other sliding wardrobe door.