• 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: deivy petrescu <email@hidden>
  • Date: Fri, 1 Dec 2006 21:57:30 -0500


On Dec 1, 2006, at 17:33, David Green wrote:

I would like to create an Applescript application that will search a
specified directory for a string of text, or illegal characters. The app
will create a file with the path to the found text, the owner of the file,
and the creation date.


I would also like to see statistics on how many "bad" files have been found,
and who the common offenders are.


The reason this is being considered is because we have several people
ignoring our naming conventions, and creating folders with a 'space' as the
first character. While this works fine on Apple OS's, it creates problems
with archiving and maintaining the same conventions across several
facilities. I feel it has become necessary to document the offenders and
inconsistencies in naming to solve our problem.


Do any applications like this exist already?

Any advice is greatly appreciated.

Best,

David

As suggested earlier by Mark, I'd go with a shell command. But, Applescript can get everything in one fell swoop:



set j to alias "Folder_I_want_to_Search:"
tell application "Finder" to get (the properties of every file of entire contents of j whose name contains " ")



Improve it to meet your needs.

By the way, I used here with a folder with many subfolders that had many subfolders with subfolders and it was not that bad, about 3.5 s (28 folders all together).


Deivy _______________________________________________ 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: 
 >Applescript to search filenames (From: "David Green" <email@hidden>)

  • Prev by Date: Re: Applescript to search filenames
  • Next by Date: Re: Odd Finder Behavior
  • Previous by thread: Re: Applescript to search filenames
  • Next by thread: Re: Applescript to search filenames
  • Index(es):
    • Date
    • Thread