To collapse a single directory, double click on it. You can collapse a particular directory path one level at a time by double clicking on single directories. To collapse selected directories level by level, click on the first directory you want to select. Continue to select directories by shift clicking on them. When selecting the last directory, double click while still pressing the Shift key. This selects the last directory and collapses all the directories you have selected.