Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Judo

macrumors regular
Original poster
Mar 6, 2002
213
167
New Zealand
I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX.
It would be good to be able to omit some folders from this list as well.

I've had a look around but have not been able to find anything to help me.
Any ideas anyone?
 
Judo said:
I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX.
It would be good to be able to omit some folders from this list as well.

I've had a look around but have not been able to find anything to help me.
Any ideas anyone?

I'm no UNIX expert, but I'm fairly certain you can do this easily via the terminal. Study up on some terminal commands.

And just out of curiosity: why, if you don't mind me asking? A list of every file would be HUGE.
 
When you click on your HD icon from your desktop, depending on how you
have your view preferences set, you'll either see folders or a list or column view

Click the middle VIEW button and you'll get a list of all your main folders and sub folders.

Is this what you were trying to print to pdf?

Please be careful and don't just go moving files around if you don't know where they belong.
 
Cameront9 said:
I'm no UNIX expert, but I'm fairly certain you can do this easily via the terminal. Study up on some terminal commands.

And just out of curiosity: why, if you don't mind me asking? A list of every file would be HUGE.


Yeah, I thought there might be a unix command for this, I'll have to look it up, unless there are any experts out there who can help me out.

A client is asking for this. She has asked for a list of all files on her computer. And I'm not exactly sure why she wants it, but she's the one paying.
 
FFTT said:
When you click on your HD icon from your desktop, depending on how you
have your view preferences set, you'll either see folders or a list or column view

Click the middle VIEW button and you'll get a list of all your main folders and sub folders.

Is this what you were trying to print to pdf?

Please be careful and don't just go moving files around if you don't know where they belong.


Not quite what I want, I need a list of all of the files on her computer. I'm a Apple techie, so I know what not to move, and I should probably know how to do this but I dont. :(

Thanks for the help so far guys, you're awesome. :hugsmilie:
 
She does realize that this list could easily be 50,000+ files long, right?
 
try typing

ls /*

I am not sure if this will get all of the folders within folders though just all of the directories and the files in the root directory

anyone figure this out?

to save it as a file just do this though

ls /* > filename ~ the tilde is the directory you want to save the file in


hope this helps somewhat or at least provides a starting point
 
Okay...here we go. Download WhatSize. Let it scan the entire hard drive. Hit Command-3 to see everything in Table View. (BTW, my tiny 500 MHz iBook with 4 GB of stuff on has 85000 files and 20000 folders.) Click somewhere on the table to make sure it has focus, then print to PDF. I tried it with a small sample of files...about 25 of them (used the "files over 100 MB" filter to limit things)...and it seemed to work.

I don't know how happy her computer will be about trying to produce a 2000+ page PDF though...
 
in the terminal type

find /

will list everything

find / -type f

will list just files. change f to a d to find just directories.

find / -type f > allfiles.txt

will save it in a text file called allfiles.txt

man find

will tell you more about the find command
 
WildCowboy said:
Okay...here we go. Download WhatSize. Let it scan the entire hard drive. Hit Command-3 to see everything in Table View. (BTW, my tiny 500 MHz iBook with 4 GB of stuff on has 85000 files and 20000 folders.) Click somewhere on the table to make sure it has focus, then print to PDF. I tried it with a small sample of files...about 25 of them (used the "files over 100 MB" filter to limit things)...and it seemed to work.

I don't know how happy her computer will be about trying to produce a 2000+ page PDF though...

Woo, just tried this and it's up to 2100 pages. I don't think she could use that.
I might have to find a way to exclude the system and library folders, and I think the terminal maybe the only way to do this.

edit: just over 3600 pages
 
I'm not sure why one would want a list of ALL files, but I could see a list of all files in a particular directory, such as movies or something.
 
Another way

This is a bit of a basic approach but its easy and doesnt need terminal.

What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.

Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.

In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.

In Pages or Text edit, choose edit then "paste and match style"

You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.

Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
 
This is a bit of a basic approach but its easy and doesnt need terminal.
What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.
Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.
In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.
In Pages or Text edit, choose edit then "paste and match style"
You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.
Woks fine in In OSX 10.6.4 (and probably in most recent revisions)

OK, but this only copies the file NAMES, not Modification Date or size.
 
Last edited:
Thankful for those who post solutions in MacRumors!

3. Judo's issue(s) was resolved.
2. toasted_ICT's solution worked well for what I was needing.
1. Thanks to all of you who aim to help others on this forum!
 
JUST what I was looking for! Many thanks.

This is a bit of a basic approach but its easy and doesnt need terminal.

What you do is, in the Finder, Open up any subfolders you need to see the file list within. Then uses "command A" to select all.

Open 'MSWord' or 'Pages' or 'Text Edit' to a new blank document.

In MS word choose 'edit' then 'paste special' then in the dialog box choose 'unformatted' text. This wil paste in the text of the directory structure.

In Pages or Text edit, choose edit then "paste and match style"

You might want to indent the folders and files to reflect a hierarchy. This works OK if the directory listing is not massive or contains many sub levels.

Woks fine in In OSX 10.6.4 (and probably in most recent revisions)
 
"I'm looking for an easy way to create a list of every file on a hard drive, and create a .pdf of it in OSX."

Are you really REALLY sure that you want to do this?

Do you know how many files make up a typical installation of OS X?

We're talking in the neighborhood of 200,000+. You may actually have more than that.

Do you really want to create a pdf with a quarter of a million entries?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.