Table of Contents       9. AppleScript

9.5 Cataloging and updating

One of the most important tasks of NeoFinder is to catalog a disk or folder, or to update an existing catalog. This can also be automated by using AppleScript. The syntax for it, as shown in the Script Editor from Apple, is:

catalogv : Catalog/Update a folder or disk
catalog file
eject afterwards boolean] : eject the volume after cataloging is finished? (if possible...)
canUpdate boolean] : if true, then update catalog if it already exists and is not up-to-date
canDuplicate boolean] : if true, then duplicate catalog if it already exists and is up-to-date

Here is an example:

tell application "NeoFinder"
with timeout of 20000 seconds -- cataloging might take a lot longer than the default 60 seconds
catalog "/Volumes/Daten/" with canUpdate
end timeout
end tell

Please note that NeoFinder will use the current Cataloging Preferences, so make sure these are set up correctly.

canUpdate parameter is required if you want to update an existing catalog of the chosen volume or folder, or NeoFinder will return error -128.

If the disk can be unmounted or ejected after NeoFinder is done with it, use the
eject afterwards parameter.

The path that you give NeoFinder can either be an entire volume, as in the example above, or just a folder.