2 Replies Latest reply: Jan 31, 2013 11:13 AM by Narcisse2
Narcisse2 Level 1 (0 points)

Hi and thanks in advance for your help.


I have a MBP running Mac OS X 10.7.5.


I frequently backup my media (music, movies, etc.) on external hard drives (about 500GB).


I would like to have a file that lists all the folders and subfolders on a drive.


I have found several threads with command lines and scripts but none of them have worked.


I hope someone can help me with this !


Thanks !

MacBook Pro, Mac OS X (10.7.4)
  • Espeon Level 2 (160 points)

    The best I've found at the moment is http://www.jonn8.com/html/scripts/misc/List_Folder_Contents.html, however, it maps both files and folders, so I'm working on changing that.


    Edit: It seems like the following script I wrote will work; I'm not sure as it also maps the folders within an app, and sine I have a few apps, it still hasn't finished yet.



    property kFileList : {}


    set source_folder to "Macintosh HD" as alias

    my createList(source_folder)


    on createList(item_list)

              set the the_items to list folder item_list without invisibles

              set item_list to item_list as string

              repeat with i from 1 to number of items in the the_items

                        set the_item to item i of the the_items

                        set the_item to (item_list & the_item) as alias

                        set this_info to info for the_item

                        set file_name to name of this_info

                        set end of kFileList to file_name

                        if folder of this_info is true then

                                  my createList(the_item)

                        end if

              end repeat

    end createList


  • Narcisse2 Level 1 (0 points)

    Thank you! this is exactly what i was looking for!