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

sonarghost

macrumors regular
Original poster
I am not sure if I am asking this question correctly so I'll give an example:

I have approximately 20,000 sound samples in a folder that I would like to print a list of using text edit (or anything else you suggest). Do i HAVE to hand type each name to a list, or cut and paste each individual sample name or is there a command to "extract" the name of all of the contents?

Thank you in advance to all of those that can help me!🙂
 
Try dragging all of the sound files into an open Text Edit window. Or select the files, hit copy, and paste into a text edit window. Good chance one of those will work.

If those don't work I can drum up an Automator workflow for you.
 
Try dragging all of the sound files into an open Text Edit window. Or select the files, hit copy, and paste into a text edit window. Good chance one of those will work.

If those don't work I can drum up an Automator workflow for you.

Thank you very much for the response!

When i do copy the items and paste them to the text edit window the titles are in a random order.. I don't know why. The folder contents are alphabetized I have no idea how to get the same alphabetized result with the copy and paste.. Any Ideas?
 
Sure. Do you have Excel? You could paste the file names into Excel and then use the AutoFilter to alphabetize the files. Otherwise I can figure this out with Automator but I'm not at my Mac right now (on my Vista PC at work 🙁)and can't do it this moment. The Excel thing would work like a charm though.

EDIT: BBEdit would sort them for you too if you have that (its a free download).
 
There is an AppleScript included with your Mac that can do this.
It's in "Library>Scripts>Printing Scripts" It's called "Print Window Script".
 
And yet another solution: If you want some fun with Terminal, it's a simple matter of doing this:

1. Open Terminal

2. Type cd with a space after it and drag the folder that has the files into Terminal and press enter

3. Type: ls -1 > my_directory_listing.txt

4. Close Terminal, and in the folder with the 20,000 samples, it should have created a my_directory_listing.txt -- open this with TextEdit.

By default this will sort them by name alphabetically.
 
There is an AppleScript included with your Mac that can do this.
It's in "Library>Scripts>Printing Scripts" It's called "Print Window Script".

First of all..GimmeSlack, Lixivial, and lancestraz Thank you for your time in helping me find the answer! I downloaded bbedit as recommended and plan on trying that out. I actually just finished using the apple script and it worked like a charm!😀

Once again, THANK YOU ALL!🙂
 
And yet another solution: If you want some fun with Terminal, it's a simple matter of doing this:

1. Open Terminal

2. Type cd with a space after it and drag the folder that has the files into Terminal and press enter

3. Type:
Code:
ls -l | awk '{for(i=0;i<8;i++){sub(/([^ ]* *)/,"")}print}' > my_directory_listing.txt

4. Close Terminal, and in the folder with the 20,000 samples, it should have created a my_directory_listing.txt -- open this with TextEdit.

By default this will sort them by name alphabetically.

Wouldn't it be easier to just type:

ls > my_directory_listing.txt

in your step 3.
 
There is an AppleScript included with your Mac that can do this.
It's in "Library>Scripts>Printing Scripts" It's called "Print Window Script".


Thanks Lixivial for pointing out this script, but can you get the same script to print to PDF or Excel, reason is I have many folders that I need the information from and I would prefer to get them all in one place then edit them then print.


Any suggestions.
 
Code:
ls -R <path_to_folder> > ~/Desktop/list.txt

Just open up the file list.txt that will appear on your Desktop in your text editor and you can do PDF or whatever your heart pleases. The -R flag is important if you have subdirectories, which I imagine for that many sound samples you will.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.