• 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
Newbie question -Applescript and Filemaker problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie question -Applescript and Filemaker problems


  • Subject: Newbie question -Applescript and Filemaker problems
  • From: email@hidden
  • Date: Sat, 6 Apr 2002 19:44:24 EST

Greetings!
I have managed to write a script that catalogs the contents of a folder and
adds items to a filemaker database. The problem I have is that it is soooooo
slow. Can anyone please tell me if there is a way to make this faster.
Thanks
Andy

set the chosen_folder to (choose folder with prompt "Pick the folder
containing the files to catalog:")
tell application "Finder"
set FileName to ""
set FilePath to ""
set FileCreation to ""
set FileModified to ""
set FileCreator to ""
set FileType to ""
set Filepic to ""
repeat with i from 1 to count of every item in the chosen_folder
set Filepic to item i of every item of the entire contents of
chosen_folder as text
set FileName to name of item i of every item of the entire contents of
chosen_folder as text
set FilePath to item i of every item of the entire contents of
chosen_folder as text
set FileKind to kind of item i of every item of the entire contents of
chosen_folder
set FileCreation to creation date of item i of every item of the
entire contents of chosen_folder
set FileModified to modification date of item i of every item of the
entire contents of chosen_folder
set FileCreator to creator type of item i of every item of the entire
contents of chosen_folder
set FileType to file type of item i of every item of the entire
contents of chosen_folder
set FileSize to size of item i of every item of the entire contents of
chosen_folder
set FilePhysicalSize to physical size of item i of every item of the
entire contents of chosen_folder

tell application "FileMaker Pro"
set myNewRecord to (create new record)
set cell "name" of myNewRecord to FileName
set cell "where" of myNewRecord to FilePath
set cell "kind" of myNewRecord to FileKind as text
set cell "fileCreated" of myNewRecord to FileCreation as string
set cell "fileModified" of myNewRecord to FileModified as string
set cell "Creator" of myNewRecord to FileCreator as string
set cell "type" of myNewRecord to FileType as string
set cell "physical size" of myNewRecord to FilePhysicalSize as
number
set cell "size" of myNewRecord to FileSize as number
end tell
end repeat
end tell
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Newbie question -Applescript and Filemaker problems
      • From: Paul Tuckey <email@hidden>
    • Re: Newbie question -Applescript and Filemaker problems
      • From: Andy Wylie <email@hidden>
  • Prev by Date: Re: Display dialog does nt work in OS X
  • Next by Date: Re: do shell script - which shell?
  • Previous by thread: Re: Terminal scripting
  • Next by thread: Re: Newbie question -Applescript and Filemaker problems
  • Index(es):
    • Date
    • Thread