Re: help AS script to search for files using Sherlock gets indexing
Re: help AS script to search for files using Sherlock gets indexing
- Subject: Re: help AS script to search for files using Sherlock gets indexing
- From: q~ <email@hidden>
- Date: Sun, 16 Sep 2001 09:39:38 -0400
Is this Window's volume mounted locally or via a network connection? We
recently had an issue with OS8.6 mounting a Windows network volume with
code that previously worked fine, we found that downgrading the
AppleShare extension from version 3.8.8 to 3.8.3 fixed the problem --
this may also help Sherlock's issue. (I'm pretty sure 3.8.3 is not
compatible with OS9.x). Using ExtremeZIP instead of Microsoft's built in
Macintosh file services may also help.
Another option would be to use the Finder's search capability, this is
slower but could work. I can't remember the syntax right off, if you
need it I can send it on Monday.
Why not get the name of the file to be moved. Then test to see if it is
in the destination directory. If it does, change the name of the
original, copy it, reset the name of the original.
tell application "Finder"
--I've treated source_file, source_dir & destination_dir as string
values that end with':'
set nameof_filetocopy to name of file source_file
if (exists file (destination_dir & nameof_filetocopy)) then
set new_name to (nameof_filetocopy & "01") --some new value
set name of file source_file to new_name
duplicate file source_file to folder destination_dir
set name of (source_dir & new_name) to nameof_filetocopy
else
duplicate source_file to folder destination_dir
end if
end tell
On Thursday, September 13, 2001, at 06:30 PM, applescript-users-
email@hidden wrote:
Message: 12
Date: Thu, 13 Sep 2001 18:15:41 -0400
To: email@hidden
From: Bill Christens-Barry <email@hidden>
Subject: help AS script to search for files using Sherlock gets indexing
error??
I have a real dilemma: I'm trying to use a script to do a Sherlock
search of a volume and keep getting a "volume is not indexed" error
msg. I am searching for file names, not by content, so I don't
understand where/why indexing comes in. The volume in question was
formatted under Windows and is mounted on the Mac hosting Sherlock
and AppleScript.I understand that indexing may not be possible for
such volumes, but this shouldn't enter in since I'm not. Still, it
smells like a problem due to the treatment of the Windows volume.
My colleague who is testing the script elsewhere is able to search
the same volume:directory: using Sherlock by hand (that is without it
being carried out by a script) but gets the error when he runs my
script. The script works fine on my all-Mac system, running MacOS 8.6
and AppleScript 1.4.3. The system my colleague is using is an older
flavor of MacOS 9.