Capture directory listing to plain text file

Can anyone please suggest a method to capture the contents of a directory listing to a plain text file?
--David