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: 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 | # ]