• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript to search filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Applescript to search filenames (From: "Ripka, Herb" <email@hidden>)

  • Prev by Date: Re: Filemaker 8 Help - Find a record
  • Next by Date: Re: "Do Visual Basic" crashes Word
  • Previous by thread: Re: Applescript to search filenames
  • Next by thread: RE: Odd Finder Behavior
  • Index(es):
    • Date
    • Thread