Re: Applescript to search filenames
Re: Applescript to search filenames
- Subject: Re: Applescript to search filenames
- From: "David Green" <email@hidden>
- Date: Mon, 4 Dec 2006 16:39:21 -0800
On 12/2/06,
Ripka, Herb <
email@hidden> wrote:
Finds spaces, " ", at the beginning, or at the end, of filenames.
FROM http://bbs.applescript.net/viewtopic.php?id=19006
October 31, 2006
by StefanK from Sankt Gallen, Switzerland
* * * * * * *
set f to (choose folder)
tell application "Finder" to set e to files of f's entire contents whose (name begins with " " or name ends with " ")
if (count e) > 0 then
set filelist to {"Contents of " & f & return & return}
repeat with i in e
set end of filelist to ((i as string) & return)
end repeat
set the clipboard to filelist
beep 2
tell application "TextEdit"
activate
make new document at beginning with properties {text:filelist as Unicode text}
end tell
else
display dialog "no matches found"
end if
Thanks for all the input! I haven't had a chance to test this on our filesystem yet, but I will soon.
I appreciate all the help!
David
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden