• 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: "Ripka, Herb" <email@hidden>
  • Date: Sat, 2 Dec 2006 14:11:39 -0600
  • Thread-topic: Re: Applescript to search filenames

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
 _______________________________________________
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

  • Follow-Ups:
    • Re: Applescript to search filenames
      • From: "David Green" <email@hidden>
  • Prev by Date: Inserting a bullet in Quark
  • Next by Date: Scriptig iTMS Links?
  • Previous by thread: Re: Applescript to search filenames
  • Next by thread: Re: Applescript to search filenames
  • Index(es):
    • Date
    • Thread