OS X - Operating System General OS operation information and support

Printing a list of file folders


Post Reply New Thread Subscribe

 
Thread Tools
sonyman74

 
sonyman74's Avatar
 
Member Since: Mar 08, 2009
Location: Mansura, LA
Posts: 30
sonyman74 is on a distinguished road
Mac Specs: 27" iMac

sonyman74 is offline
I have about 50 files on my 1tb external HDD. Is there a way I can print a list of the file names without having to re type them in Pages. They are names of video files I have and I need to make a list of them. Any help would be very appreciated.
QUOTE Thanks
MacsWork

 
MacsWork's Avatar
 
Member Since: May 22, 2005
Location: Closer than you think.
Posts: 2,074
MacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really nice
Mac Specs: Performa 6116 2GBSCSI 8MB OS 7.5.3

MacsWork is offline
Open Terminal

Type the command below. Modify the paths and/or filename to suit you.

ls path/to/directory/to/print >> ~/Documents/filename.txt

Open file with Text Edit and copy contents into Pages.
QUOTE Thanks
sonyman74

 
sonyman74's Avatar
 
Member Since: Mar 08, 2009
Location: Mansura, LA
Posts: 30
sonyman74 is on a distinguished road
Mac Specs: 27" iMac

sonyman74 is offline
I have not messed with Terminal before.
QUOTE Thanks
mbohn

 
Member Since: Jul 09, 2009
Location: Colorado
Posts: 356
mbohn will become famous soon enough

mbohn is offline
Here's an example. I want to print a list of files in my home directory which is called

/Users/mark

So I enter into terminal

$ ls /Users/Mark >> ~/Documents/home.txt

(The $ is the prompt Terminal gives you to tell you it is ready for a command. The symbol ~ is shorthand for your home directory = /Users/mark)

And the file home.txt is then created in my Documents folder and looks like:

Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Public
Screen shot 2009-10-30 at 7.05.54 AM.png
Sites
SketchUpDrawings
untitled folder

www.dynostep.com
engine simulation software
QUOTE Thanks
sonyman74

 
sonyman74's Avatar
 
Member Since: Mar 08, 2009
Location: Mansura, LA
Posts: 30
sonyman74 is on a distinguished road
Mac Specs: 27" iMac

sonyman74 is offline
I don't mean to sound totally stupid but I still don't understand.
QUOTE Thanks
mbohn

 
Member Since: Jul 09, 2009
Location: Colorado
Posts: 356
mbohn will become famous soon enough

mbohn is offline
No problem.

Do you know how to start up Terminal? You can find it under Applications, Utilities. Open up Finder (should be on your dock) and on the left side you'll see Applications. Click that and scroll down until you see Utilities. Click that and scroll down to Terminal. Click that and a window will open up.

Two lines will be displayed something like this:

Last login: Wed Dec 23 17:47:44 on ttys000
mbohn-macbook-pro:~ mbohn$

There will be a cursor just past the $ sign.

Type in ls (that is a lower case "ell") and Terminal will list the files in your home directory.

To get that information into a file instead of into the Terminal window:

$ ls >> filelist.txt

So the file filelist.txt will now have your list of files.

The trick here is going to be for you to find the directory you want to list. If you can navigate in Terminal to that directory you are all set. The command above will do what you want and the file filelist.txt will end up in that directory. If you don't know how to navigate in Terminal you can put the directory name in like we did before:

$ ls /Users/Mark >> ~/Documents/home.txt

www.dynostep.com
engine simulation software
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,534
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
ls won't output the filenames under directories, however du will...

so

du -sch /path/to/folder

would work better IMO, course you can also just print directly from the command line

du -sch /path/to/folder | lp

should send it to your printer

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
sonyman74

 
sonyman74's Avatar
 
Member Since: Mar 08, 2009
Location: Mansura, LA
Posts: 30
sonyman74 is on a distinguished road
Mac Specs: 27" iMac

sonyman74 is offline
Do I use the external HDD name. It is "Iomega"
QUOTE Thanks
Dysfunction

 
Dysfunction's Avatar
 
Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,534
Dysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant futureDysfunction has a brilliant future
Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff

Dysfunction is offline
in that case it'd likely be

du -ach /Volumes/Iomega/* | lp

to print directly to a printer

that will print ALL files in that path...

mike
This machine kills fascists
Got # ? phear the command line!
QUOTE Thanks
MacsWork

 
MacsWork's Avatar
 
Member Since: May 22, 2005
Location: Closer than you think.
Posts: 2,074
MacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really niceMacsWork is just really nice
Mac Specs: Performa 6116 2GBSCSI 8MB OS 7.5.3

MacsWork is offline
Avoid the Terminal all together if there are no directories, just a list of files.

Open Iomega and do a Select All, then Copy
Open Text Edit
Format menu > Make Plain Text
Paste

There is your file list.
QUOTE Thanks
ArrowJ

 
ArrowJ's Avatar
 
Member Since: Oct 18, 2009
Posts: 110
ArrowJ is on a distinguished road

ArrowJ is offline
PrintFinder
QUOTE Thanks
toMACsh

 
toMACsh's Avatar
 
Member Since: Jul 30, 2009
Location: Wisconsin
Posts: 4,816
toMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of light
Mac Specs: Mac Mini Core 2 Duo

toMACsh is offline
If you don't want to mess with Terminal, or install other software, there is a slightly less labor intensive way to do this than re-typing everything: copy and paste. Open the folder you want to list, and your Text Editor. Highlight a file/folder name, Cmd-C, switch to the Text Editor, Cmd-V. Do this until all of them are listed in your new file, then print it.
QUOTE Thanks
sonyman74

 
sonyman74's Avatar
 
Member Since: Mar 08, 2009
Location: Mansura, LA
Posts: 30
sonyman74 is on a distinguished road
Mac Specs: 27" iMac

sonyman74 is offline
Thanks MacsWork. That was very simple.
QUOTE Thanks
toMACsh

 
toMACsh's Avatar
 
Member Since: Jul 30, 2009
Location: Wisconsin
Posts: 4,816
toMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of lighttoMACsh is a glorious beacon of light
Mac Specs: Mac Mini Core 2 Duo

toMACsh is offline
Yeah, I missed that. Great tip!

That works within any folder, right?

So, even if you have multiple "directories" you just have to do that in each one.

(See, I did read it carefully, the second time!)
QUOTE Thanks

Post Reply New Thread Subscribe


« Width of opening page too large | very wierd problem just started happening »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Red names in file list? nigelmercier OS X - Operating System 7 12-03-2009 05:23 AM
"Kind" field in Finder (List View) displays wrong language for folders macmac22 OS X - Operating System 0 07-16-2009 04:40 PM
Info.plist to *open* a file gamblor01 OS X - Development and Darwin 2 03-22-2009 11:00 PM
File sharing sub folders dreck Switcher Hangout 2 08-03-2008 04:00 PM
Open Letter to Apple Saint Mark Switcher Hangout 23 08-15-2006 03:15 AM

All times are GMT -4. The time now is 02:50 AM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?