Re: Index a given folder
Re: Index a given folder
- Subject: Re: Index a given folder
- From: "Ripka, Herb" <email@hidden>
- Date: Thu, 8 Apr 2010 14:38:12 -0500
- Acceptlanguage: en-US
- Thread-topic: Index a given folder
The following returns filepaths of all files and subfolders from the chosen folder.
--Herb Ripka
+++++
set f to (choose folder)
tell application "Finder" to set e to f's entire contents
if e = {} then
beep
display dialog "No items found in the folder “" & f & "”." buttons {"Cancel"} default button 1 with icon 0 giving up after 10
else
set fileList to {"Contents of " & f & return & return}
repeat with i from 1 to (count e)
set end of fileList to ("" & e's item i & return)
end repeat
set the clipboard to "" & fileList
beep 2
end if
tell application "TextEdit"
make new document at beginning with properties {text:fileList as Unicode text}
activate
end tell _______________________________________________
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