Tom Lauck’s Deseloper.org

Print File Structure In Mac OS X - UPDATE

author: tom

UPDATE: I will not upgrade to Leopard yet. Therefore I haven’t tested this in Leopard. As the lone commenter pointed out, it did not work for him. The topic arouse while working a large project: “How can I print the directory structure in OS X? It was easy in OS 9.”It is possible by using the Terminal application. I intend to write an AppleScript in the near future to do this automatically.Open up Terminal (Its located in the Utilities folder in Applications)Enter

cd

*Make Sure there is a space after ‘cd

Select or open a finder window that has the directory of interest. Drag the file to the Terminal window and hit EnterA new line should appear. Type:

ls -RF > ~/Desktop/file_structure.txt

Look at your Desktop. A file named ‘folder_list.txt’ should be visible. You can now edit and do with it what you wish. is the name of the file you want the output of the recursive ls command to write out to. Feel free to use something more descriptive as you wish.

2 Responses

date: November 6th, 2007

using os leopard. Instructions above did not work.

spoken by: adam

date: December 16th, 2007

very interesting, but I don’t agree with you
Idetrorce

spoken by: Idetrorce

Leave a Reply

Feb 14 2007