|
|
Directory Contents to .txt file?
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Baltimore
Status:
Offline
|
|
Forgive me if this is the wrong place for this, but I have a folder with more than 200 PDF files and I need a list of them by file name.
I've seen a friend working in DOS use a command that created a text file of a directory's contents. Is there a UNIX/OS X command I could use to do the same thing? Keep in mind I've pretty much never opened the Terminal, so if it's too tricky feel free to just pat me on the head and tell me to run along.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2002
Status:
Offline
|
|
you don't need the terminal to do this.
open the folder (in the finder)
command-a (select all)
command-c (copy)
open text edit.
command-v (paste)
instant list of files and folders in the folder.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: Baltimore
Status:
Offline
|
|
No way?! It's that simple? I should have tried this first.
I know that if you have the Print Center icon in your dock, you can drag a folder onto it and it will print a list of the contents.
Thanks for the info.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status:
Offline
|
|
Originally posted by KeyLimePi:
Forgive me if this is the wrong place for this, but I have a folder with more than 200 PDF files and I need a list of them by file name.
I've seen a friend working in DOS use a command that created a text file of a directory's contents. Is there a UNIX/OS X command I could use to do the same thing? Keep in mind I've pretty much never opened the Terminal, so if it's too tricky feel free to just pat me on the head and tell me to run along.
Sure.
'ls -l > filename.txt'
The '>' means dump the output of the command to the left into the entity on the right. In other words, give me the directory contents and dump them into a file I called 'filename.txt'.
|
Swimming upstream since 1994.
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Sep 2000
Location: The dark side of the moon
Status:
Offline
|
|
Or, simply do "ls > filename.txt" which will produce a list with only file names.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2002
Status:
Offline
|
|
Originally posted by KeyLimePi:
I know that if you have the Print Center icon in your dock, you can drag a folder onto it and it will print a list of the contents.
Thanks for the info.
heh, I didn't know that. thanks.
|
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Status:
Offline
|
|
Originally posted by warpmoon:
Or, simply do "ls > filename.txt" which will produce a list with only file names.
ls -1 if you want just one per line.
EDIT: Although ls does this if you pipe anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|