Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
How to copy list without file extensions

Lots of great ideas AND what I would really like is to be able to copy the file list without the extensions.

For example'

I would not like the copied list to read
gray squirrel.indd
trout.indd
tree frog.indd
eagle.indd
king cobra.indd

I would like the list to read
gray squirrel
trout
tree frog
eagle
king cobra

Print window did not seem to do this, at least in the free version, nor could I get any of the other suggestions here to work on this.

Does anyone know how to get lists without the file extensions?
 
Drag the selected files into a TextEdit Plain Text window, as described earlier.

Then in TextEdit, use Find to find .indd and Replace with to replace it with nothing. Then click the Replace All button.
 
Thanks!

Excellent!
Thank you so much chown33.
That really helps me out a lot with my reading project for an app.:)
 
One really simple way to do this is the following:

1) Open TextEdit (or, I assume, any text application).

2) Navigate to the folder in question with your Finder.

3) Select a file within said folder and press command A to select all.

4) Press command C to copy.

5) Return to TextEdit and hold down command, option, and shift, and then hit V to paste and match style.

Voilà. There's your list.

This may be great for just one folder or a folders, and Terminal command is also good, again for a selection of folders, but in my case, what if you want to print all directories and subdirectories ?

You cannot go though 650Gig hard drive, since it would take forever...
 
I wonder if the process is still ongoing for someone who decided to try it when that was posted . . . three years ago. :p
 
This may be great for just one folder or a folders, and Terminal command is also good, again for a selection of folders, but in my case, what if you want to print all directories and subdirectories ?

Are you asking because you really want to print every file, directory, and subdirectory? On paper? Really?

Do you have any idea how many pages that would take?

Here's an example calculation:
1. Suppose your disk contains 100 thousand files.
2. Suppose you can print 100 filenames per page.
3. Suppose you print it double-sided (200 filenames per sheet of paper).
4. The result would take one ream (500 sheets) of paper, which is a stack about 2 inches high (~5 cm).

A typical hard disk with OS X Mtn Lion on it contains more than 100 thousand files. Over 200 thousand, in fact. So adjust the above paper estimates accordingly.

Then consider how many pages a typical toner or ink cartridge prints.

You can find out how many files are on your hard disk using Disk Utility.app, located in your Utilities folder. Launch it, select your disk, and look at the bottom of the window where it shows "Number of Folders" and "Number of Files".


If you're completely serious, I can post a Terminal command that will produce a text file that lists every single file and directory on the disk. It's actually a fairly simple command. Then you can worry about how to print it.

Please describe exactly what you want to accomplish, and please be specific.
 
I think that was posted as a solution, not a question.

I see it as a question:
This may be great for just one folder or a folders, and Terminal command is also good, again for a selection of folders, but in my case, what if you want to print all directories and subdirectories ?

It has an interrogatory ("what if") and a question mark, so I conclude it's a question. Or could it be a rhetorical question?

There is a simple command-line that will product a complete listing, and it doesn't take forever to run. Printing it, however, poses a different set of problems than getting the listing into a text file.

Here's the command line:
Code:
sudo find -x / -print >~/all.txt
It will ask for your admin password, so enter it.
On my MacBook Pro with a Core i5, it took about 2 minutes to finish, for a stock 5400 RPM hard disk containing about 350,000 files & folders. YMMV. Printing it at 200 lines per sheet would take almost 4 reams of paper (a stack about 8 inches high). Caveat printor.

As given, the command is limited to only the startup disk. If there are other mounted partitions, external disks, optical discs, USB thumb drives, network shares, etc. they will not be listed. If someone needs to do that, the simplest way is to remove the -x. There are other ways.
 
As an alternative to the solution described above, I would propose using Automator, especially if this is a task you will want to repeat regularly on various folders.

With automator, you can easily build a little "program" to make that...

Here is how to do it:
1. Start automator
2. Select FINDER in the left "Library" column
3. Drag and drop from the right "action" column the following actions:
- Ask for finder items (make sure you select the type "Folders" in the options)
- Get folder contents
- Print finder items or maybe better New text file

If you use it often on various folders, you can make it an app. and put in your Dock.

Good luck!

Thanks! That's very helpful. Actually it's the first time I succeeded in using automator. I even at sorting action!

It is exciting!
 
While copying and pasting works, if you want a formatted listing (i.e., each sub-folder and contents indented), this is better and at least as easy:

  1. Open a new window in TextWrangler -- other text editors might work but TextEdit did not as it only copied the folder's path. TextWrangler is the freeware version of BBEdit and is available for downloading here: <http://www.barebones.com/products/textwrangler/download.html>
  2. Navigate to the folder you want in the Finder.
  3. Drag that folder to the TextWrangler window.
  4. You'll have a formatted listing of all the contents of that folder, including all sub-folders and their contents.

I know it's an old post, but thanks for that solution. I needed a solution that would tab the files in the subfolder and this did the trick. It was nice and easy.

This is a great solution for someone that wants to include sub-directories and see the file structures.
 
Thanks for bumping this actually, I didn't see that solution and now that I use Text Wrangler for html editing, that's a handy second use.
 
rodeman - You can print a list of files in your folder by navigating to it through terminal.

Open Terminal, navigate to the folder your files are in and then use the following command: ls -l

After your files are listed, select them with your mouse and then on the Menu Bar click Shell and Print Selection.

To see what the print output will look like, preview the print or print to PDF.

Let me know if you have additional questions.

Thank you, it's as simple as that.

nice trick :D
 
One really simple way to do this is the following:

1) Open TextEdit (or, I assume, any text application).

2) Navigate to the folder in question with your Finder.

3) Select a file within said folder and press command A to select all.

4) Press command C to copy.

5) Return to TextEdit and hold down command, option, and shift, and then hit V to paste and match style.

Voilà. There's your list.

This is a great and quite handy little trick! Thank you! Just what I was looking for.
 
The problem is that file names will come with the full path.


JafTalks.com
To begin, open TextEdit and press Command-Shift-T or select Format > Make Plain Text

To get a list of files with complete file paths, drag the selected files from Finder into the TextEdit window.

To get a list of the file names only, copy the files in Finder and paste them into the TextEdit window.
 
To begin, open TextEdit and press Command-Shift-T or select Format > Make Plain Text

To get a list of files with complete file paths, drag the selected files from Finder into the TextEdit window.

To get a list of the file names only, copy the files in Finder and paste them into the TextEdit window.

Thank you :)
 
alternative using Automator

As an alternative to the solution described above, I would propose using Automator, especially if this is a task you will want to repeat regularly on various folders.

With automator, you can easily build a little "program" to make that...

Here is how to do it:
1. Start automator
2. Select FINDER in the left "Library" column
3. Drag and drop from the right "action" column the following actions:
- Ask for finder items (make sure you select the type "Folders" in the options)
- Get folder contents
- Print finder items or maybe better New text file

If you use it often on various folders, you can make it an app. and put in your Dock.

Good luck!

Thanks!
I always like to use automator.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.