There are as many ways to do this as there are MENU programs written for the TRS-80! The most common is to execute a DIR command from BASIC and then PEEK the screen; but each DOS has a different layout, so you would need to write this for a specific DOS.