Re: List content of a folder, output to document
Re: List content of a folder, output to document
- Subject: Re: List content of a folder, output to document
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 05 Jan 2010 15:30:53 -0800
- Thread-topic: List content of a folder, output to document
I agree about not using "entire contents" command on large directories.
It was very buggy for a long time, but is much better now. But it still
slows way down on large directories.
The advantage/disadvantage to using the shell is you get the contents of
application bundles.
HTH,
ES
set myFolder to POSIX path of (choose folder)
set theStuff to do shell script "find " & (quoted form of myFolder) & " \\!
-name '[.]*' -print"
set newStuff to {}
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {myFolder}
repeat with thisPath in paragraphs of theStuff
set the end of newStuff to text item 2 of thisPath
end repeat
set AppleScript's text item delimiters to {return}
set newStuff to newStuff as text
set AppleScript's text item delimiters to oldDelims
display dialog newStuff
On 1/5/10 3:18 PM, "Shane Stanley" wrote:
> I'd be nervous about using entire contents on any large file (OK, so I'm
> nervous about Finder scripting generally these days). You might try using a
> shell command like this:
>
> set theStuff to do shell script "find " & (quoted form of POSIX path of
> (choose folder)) & " \\! -name '[.]*' -print"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden