OSX: Print Contents of Folder as Text List

This Explains how to get a text version of any folder’s contents in OSX (and possibly other *NIX) added to the clipboard to be pasted wherever you like.

  1. Open the Terminal.app and CHANGE DIRECTORY to the folder you want to print
    1. Open Terminal and type
      followed by the directory path to the folder you need the list of contents for (example: /Users/jason/Desktop/foldername)
    2. press ‘enter’
  2. Change Directory in Terminal

    NOTE: Copy/Pasting these right now doesn’t work. I’ll get a little smarter on this and update this post as soon as possible.

    1. To get just the file names of the directory to which you just moved your Terminal, paste the following into Terminal and press Enter:
      1. ls -lT | awk ‘{print “\””substr($0,index($0,$10))”\””}’ \ | pbcopy
    2. To get file names, Creation Date, Size in CSV (If you don’t know what ‘Comma-Space-Delimited’ file is, look it up. Actually, this output is semicolon-delimited. Keep that in mind when importing into spreadsheet program) format, paste the following into Terminal and press Enter:
      1. ls -lT | awk ‘{print “\””substr($0,index($0,$10))”\”””;””\””$6″ “$7”, “$9″\”””;””\””$5″\””}’ \ | pbcopy

This seems to work, though not as smoothly as I remember OS9 doing it. 😀 However, I seem to recall OS9 having a few other problems that are not replicated in OSX. I attempted to write an applescript to execute this, but every time I try to get interested in AppleScript I quickly lose interest. If anybody out there can help me out with this, please do. I would think it would be as simple as that “File Path to Clipboard” applescript, but that’s a post I have yet to make. Let me know if this improves your Data-CD burning efficiency.