How to create a text file of hard drive index on Mac?

I have a couple of external drives that are getting full, so I think it’s time to put them away and get some new ones. I would like to create a text file of the drive’s contents, including all the folders and files within, then print it out and store it with the drive. Is there an easy way to do this?

You can create a catalogue text file of your hard drive on Mac using Automator. Here’s how:

  1. Press Command-Space and enter “automator,” then launch Automator.
  2. Click “New Workflow.”
  3. Choo “Folder Actions” as the type.
  4. Select “Files and Folders” beneath Library.
  5. Double-click “Ask for Finder Items.”
  6. In the Ask for Finder Items box, under Type, choose “Files & Folders.”
  7. For “Start at:,” choose the folder in which you’d like to begin your drill-down.
  8. Check “Allow Multiple Selection.”
  9. Go back to the Actions menu to the left and double-click “Get Folder Contents.”
  10. Check the box “Repeat for each subfolder found.”
  11. Go back to the Library column and choose Text.
  12. Under Text Actions, double-click “New Text File.”
  13. Name the file.
  14. Select ‘Where’ you’d like to save the file. Choose text encoding or use the default.
  15. Click Run.
  16. Choose the folder for which you’d like to generate a list of items.
  17. Go to the File menu, choose Save As.
  18. Name the Workflow and save it somewhere you can find it.
  19. When you want to use it, just double-click on it and Automator will open to the Workflow.

Note that you should rename the generated file each time you use the Workflow.