Results 1 to 10 of 10
  1. #1

    Sawday's Avatar
    Member Since
    Nov 19, 2006
    Location
    York, UK
    Posts
    1,281
    Specs:
    iMac: 24" Aluminium, 2.8 GHz, 4Gb RAM. iPad2, iPad mini2, iPhone5s
    Folder Content List
    Is there any way to export a folder (and ideally sub folders) content list to,say, a .CSV file. I would like the file names, creation date and size and I don't mind if all the sub folder contents are listed in one long list.
    Experience teaches you to recognise a mistake when you make it again.

  2. #2

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,876
    Specs:
    Way... way too many specs to list.
    If no one comes back with a way to do so from the GUI, I'll post a way to gain a text-file with this information from the command line.
    mike
    This machine kills fascists
    Got # ? phear the command line!

  3. #3

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    So, I fooled around with Automator and can get you part of the way if you're looking for a GUI option:
    Screen Shot 2011-08-17 at 1.55.01 PM.png
    That won't give you the creation date or size but it will print the name of every file (recursively) to a text document on your Desktop called "Untitled.txt."

    There is of course "ls -lhR" from the command line that will print the date, size and name of each file in a particular folder (this is the command line way). To be honest though, I'm not sure if the date printed is the modified date or the creation date. I'll have to defer to Dysfunction here.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  4. #4

    Sawday's Avatar
    Member Since
    Nov 19, 2006
    Location
    York, UK
    Posts
    1,281
    Specs:
    iMac: 24" Aluminium, 2.8 GHz, 4Gb RAM. iPad2, iPad mini2, iPhone5s
    Thanks guys. I've never managed to get Automator to do what I want but will try this if only for educational purposes. Dysfunction - do you have a command line option to go through the subfolders.
    For what I need to do, I'm not too fussed exactly which date is picked up and having to do each subfolder in turn would not be a deal breaker - just a little time consuming.
    Experience teaches you to recognise a mistake when you make it again.

  5. #5

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Would something like the following accomplish what you're looking for (I can always tweak it)?
    Screen Shot 2011-08-18 at 9.47.07 AM.png
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  6. #6

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,876
    Specs:
    Way... way too many specs to list.
    find . -type d -exec ls -lh {} \; |cut -f6- -d ' ' would also work, depending on how you want it presented.

    mikeMBP:testdir mike$ find . -type d -exec ls -lh {} \; |cut -f6- -d ' '

    136B Aug 18 07:06 Live At The Whiskey A Go-Go
    238B Aug 18 07:06 More Fun In The New World

    3.1M Aug 18 07:06 X - Live At The Whiskey A Go-Go - Blue Spark.mp3
    4.9M Aug 18 07:06 X - Live At The Whiskey A Go-Go - Johnny Hit And Run Pauline.mp3

    3.2M Aug 18 07:06 X - More Fun In The New World - Breathless.mp3
    2.8M Aug 18 07:06 X - More Fun In The New World - I See Red.mp3
    2.8M Aug 18 07:06 X - More Fun In The New World - Poor Girl.mp3
    3.1M Aug 18 07:06 X - More Fun In The New World - The New World.mp3
    2.9M Aug 18 07:06 X - More Fun In The New World - We-re Having Much More Fun.m
    mike
    This machine kills fascists
    Got # ? phear the command line!

  7. #7

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Mine is incorrect (according to your needs) - it should be the following:
    Code:
    ls -lH | awk '{print $3 "," $6 " " $7 " " $8 "," $9}'
    which prints out the following:
    Code:
    ,  ,
    vansmith,21 Mar 23:20,main.py
    To be honest, I wasn't sure how to get rid of the first line (which represents the file count printed back by the "-l" switch). If I did this with directories and attempted to do it recursively, I got the following:
    Code:
    ,  ,
    vansmith,20 Jul 13:50,src
    vansmith,18 Aug 12:42,test.txt
    ,  ,
    ,  ,
    ,  ,
    vansmith,21 Mar 23:20,main.py
    In that case, test.txt and the "src" folder are at one level and the main.py file is in the src folder. After some fiddling, I have come up with the following:
    Code:
    ls -lHRh | awk '{if ($3 != "") print $3 "," $5 "," $6 " " $7 " " $8 "," $9}'
    That outputs the following (as "user,size,modification date,file/folder"):
    Code:
    vansmith,102B,20 Jul 13:50,src
    vansmith,0B,18 Aug 12:42,test.txt
    vansmith,4.3K,21 Mar 23:20,main.py
    The only final problem I see is that you have no way of telling what is in the src folder (as I noted, the "main.py" file is in that folder). If I figure that out, I'll report back.

    Dysfunction's solution probably works better. I'm partly doing this for the learning now.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  8. #8

    Dysfunction's Avatar
    Member Since
    Mar 17, 2008
    Location
    Tucson, AZ
    Posts
    6,876
    Specs:
    Way... way too many specs to list.
    tree would be ideal for building this, too bad I do a 'which tree' and return null
    mike
    This machine kills fascists
    Got # ? phear the command line!

  9. #9

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Location
    Toronto
    Posts
    19,782
    Specs:
    2012 13" MBP (2.5 i5, 8GB)
    Just for you. Built it here - the instructions worked perfectly.
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

  10. #10

    Sawday's Avatar
    Member Since
    Nov 19, 2006
    Location
    York, UK
    Posts
    1,281
    Specs:
    iMac: 24" Aluminium, 2.8 GHz, 4Gb RAM. iPad2, iPad mini2, iPhone5s
    Thanks everyone. For the record I found dydfunctions find command line did just what I wanted.
    Experience teaches you to recognise a mistake when you make it again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Folder Actions list
    By JoshJ in forum OS X - Operating System
    Replies: 1
    Last Post: 01-09-2014, 03:10 AM
  2. Entourage: how to change folder list options
    By ajhay in forum OS X - Apps and Games
    Replies: 2
    Last Post: 12-10-2012, 02:01 PM
  3. Automaticlly Generating List of Files in a Folder?
    By MikeIsGood in forum OS X - Apps and Games
    Replies: 3
    Last Post: 05-11-2010, 05:55 PM
  4. Need to make a list of music files in a folder
    By jufjo in forum OS X - Apps and Games
    Replies: 16
    Last Post: 01-07-2010, 12:14 PM
  5. Making an editable text list of files in a folder
    By Hardie in forum Switcher Hangout
    Replies: 3
    Last Post: 09-12-2007, 03:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •