linking document file attributes into a FileMaker Pro record
linking document file attributes into a FileMaker Pro record
- Subject: linking document file attributes into a FileMaker Pro record
- From: "John, Mitchell" <email@hidden>
- Date: Mon, 6 May 2002 16:03:55 +0200
Dear scripters
I wrote some time back (Jan 2001!) on this project (you fixed me up
then...:-)
I am forming a FileMaker Pro database of documents making a link
(pathname, size etc) to the file.
I use LNS choose file osax (are there any alternatives?) to select the
file and then create a record in FMPro and copy the file path and
selected properties.
This is very slow (G4 Ti laptop, 9.2.2, 512 Mb RAM, AS 1.6, FMPro has
memory allocation of s10, m 30, p 50 MB);
There are two contradictory responses.
A single file selection is quite fast and once the document is selected
in the LNS dialog it almost instantaneously creates the FMPro record.
When I try to link say a nested folder of documents, is use Finder to
get the list:
tell application "Finder
set fileCount to (count of files in folder folderRef)
set folderCount to (count of folders in folder folderRef)
if folderCount > 0 then
set folderLocList to (every folder in folder folderRef)
end if
repeat with thisFolder in folderLocList
-- get files in each folder
set fileCount to (count of files in thisFolder)
if fileCount is greater than 0 then
set fileList to (every file in thisFolder)
-- register files in sub directory
my registerFiles(fileList)
end if
end repeat
end tell
and then registerFiles(fileList) does the following for each file in the
list...
tell application "Finder"
set docFilename to (name of docRef)
set docCreatedate to creation date of docRef
set docCreatedate to the clock from (docCreatedate) using form
"%d/%m/%c%y"
... etc
end tell
and to create the record...
tell application "FileMaker Pro"
make new record ...
set cell "Doc_file_name" of currentRec to docFilename
set cell "Doc_title" of currentRec to docFilename
...
end tell
I need a jug of coffee to stay awake. I have removed a lot of error and
option checking here but I presume this should not really add much to it
your commentary much appreciated
TIA
John
PS of course I can provide the whole script if needed
--
------------------------------------------------------------------------
--------------------------------------------------------------------
John Mitchell
Director, Virtual Building Technologies, Graphisoft R&D Rt
Zahony utca 7, Budapest 1031, Hungary
Email: email@hidden
Tel: +36 (1) 437 3263 * Fax: +36 (1) 437 3099 Mob: +36 20 978 6077
------------------------------------------------------------------------
--------------------------------------------------------------------
CONFIDENTIALITY NOTE: This message is for the named person's use only.
It may contain confidential
or legally privileged information belonging to Graphisoft R&D Rt. and/or
its subsidiaries. No confidentiality
or privilege is waived or lost by any error in transmission. If you
receive this message in error, please
immediately delete it and notify the sender. You must not, directly or
indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient.
_______________________________________________
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.