Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Recursively print folder contents via the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Recursively print folder contents via the Terminal
Authored by: imageworx on Feb 13, '04 12:26:24PM

I wonder if a drag-drop script could be made of this?

I know some folks that are designers and they are frustrated at how difficult its been to print out a small TOC of the files they have to burn to CD/DVD-R.

(I don't know about scripting...make it painless please!)

Great tip!

---
To BeOS or Not to BeOS



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: foobar104 on Feb 13, '04 01:37:45PM

Open a window with the contents of the disc showing.

Command-control-shift 4. Sweep out the part of the screen where the listing is.

Open Preview. Choose "New from clipboard" from the File menu.

Print.



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: maddys_daddy on Feb 13, '04 04:37:38PM

This is nice, but it isn't practical if you want to list all the contents of subfolders recursively. This is just a screenshot, not a content listing. That keyboard shortcut is a nice new trick for me, though. May come in handy elsewhere.



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: ngb on Feb 13, '04 06:16:11PM

Only Command-Shift-4 is needed. The Control key is not needed. If you press Space after enabling the screen capture, the cursor turns into a camera. You can then click on a window and only that window will be captured.

I was also going to suggest using "find ." as an alternative.



[ Reply to This | # ]
"I wonder if a drag-drop script could be made of "
Authored by: Barney-15 on Feb 13, '04 02:50:03PM

There is, sort of. In the Scripts folder there are Printing Scripts. One is Print Window. Another is Print Window with Subfolders.

Also, you can drag and drop a folder to a printer or the printer setup utility and it will print the listing. I don't think it is recursive, though.

---
Jim



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: hello1234 on Feb 13, '04 08:17:06PM
Here's a quick Applescript that I made. A 'choose folder' box comes up, and it asks you to pick a folder. After you do that, it creates a text file on your desktop called folder_list.txt that contains a list of the files inside of the folder that you chose. Feel free to edit it,and make it better. -Robert

tell application "Finder"
	set theFolder to choose folder "Select a Folder please"
	set theFolder to theFolder as text
	set ReplaceString to "/"
	set OldDelims to AppleScript's text item delimiters
	set AppleScript's text item delimiters to ":"
	set newText to text items of theFolder
	set AppleScript's text item delimiters to ReplaceString
	set finalText to newText as text
	set AppleScript's text item delimiters to OldDelims
	finalText
	set finalText to ("/Volumes/" & finalText)
	do shell script "ls -RF \"" & finalText & "\">~/Desktop/folder_list.txt"
end tell



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: sgi_oh_too on Feb 14, '04 02:42:09PM

just use

http://www.mit.edu/people/wsanchez/software/darwin/DropScript-0.5.dmg

i would do it for you, but i really don't have the time right now



[ Reply to This | # ]
Recursively print folder contents via the Terminal
Authored by: sgi_oh_too on Feb 14, '04 03:26:29PM
OK OK!

I felt bad about that last post, so i wrote the damn shell script for you. Just make a plain (e.g. not a rtf) text file (Text Edit works). Paste the following code in there. Save it. Then download dropScript and drop the text file on it. Then magically, a nice droppable goodie will appear for you. have fun.


#!/bin/sh

if [ -d "$@" ]; then
  ls -RF "$@" > ~/Desktop/folder_list.txt
fi


[ Reply to This | # ]