6:45 am

MacMost Now 56: Printing File Lists

Gary Rosenzweig looks at various methods for printing lists of files in folders: downloadable applications, using the Terminal, and simple copy and paste methods.

Video Transcript (Click to Expand)
Hi, this is Gary Rosenzweig with MacMost now. Today I got a question from a viewer. Chris writes; I have a need to print the file names of everything in a folder. Is there a way to do this in Leopard? Well, yes in fact there's several ways to do it. Let's take a look. So I've got three ways for you to do this. The first is use a piece of software. There's two pieces of the software out there. The first one will set you back only 15 bucks, and it's called Directory Content Printer and it's from niteowl software. Second one is one called Print Window, and it's from searchware solutions. This second one is a little more complex and allows you to do a couple extra things. Like say print a CD case or DVD case jacket with the contents of the file in the directory, that could come in handy. Alright so here's the geeky way to do it, the geeky way is to use terminal. You find that in applications utilities. Run Terminal in your command line interface to your mac. Use ls to list the files in your directory you start in your home directory so here's the folders in your home directory. You can use cd to navigate, so say cd downloads will take you to the downloads folder. Then you can list what's there, and cd up which is two dots, cd .. takes you back up. So if you want to put this to the printer say you do ls and a pipe command which is a vertical line you get by hitting shift+backslash on a keyboard, and you can do lpr which will set it to your printer if you haven't already set up on a mac. Or you can use open -f to send it right to text edit. And we see it opened up a text edit window, right there. So we've got the files so now we can do lots of different things with them. We also have other neat things we can do with ls, for instance ls -l will print a list of all sorts of detailed information for each file. So ls -l pipe it to text edit and we get something like that which gives you file sizes and creation dates, so that could be useful. Now if you need to actually get to a directory that is deep inside your mac. One of the things you can do is you can cd then drag the option key and the folder icon on the top of the directory listing, and pull it in. And it will put the entire directory path in there. So for instance I'm going to do that now with this folder, I'm going to go ahead and drag this right here like that. And you can see it will add it to the terminal window there we go. So cd and I have a complete path to that directory. Ok so we've seen two ways to do it, but here's a super simple easy way that might be all you need. Here I have a text edit window open and I also have an applications folder open. I've selected everything in the applications folder including other folders. I do command+c to copy. Now I go over to text edit window, and I paste I'm gonna get a lot of icons and stuff, I don't want that I just want the file names. So I can paste the actual style, which is in the menu, but you can also do it with shift+option+command+b and there we go I've got a complete list with everything in there. And there we go I've got a complete list with everything in there, so it's a great simple easy way to do it and you'll end up with it in text edit or another word processing program and you can print from there. SO there are three ways to print the files and folders in a directory. If you like this episode and the other MacMost episodes please subscribe to us at itunes and tell your friends as well. Also you can review us there the reviews really help spread the word about the podcast. Until next time, this is Gary Rosenzweig with MacMost now.

Comments: One Response to “MacMost Now 56: Printing File Lists”

    3/14/08 @ 8:04 am

    Hi Gary, there is a better and free way to do this … using PrintFinder :

Comments Closed.