Traversing Directories/Searching
Traversing Directories/Searching
- Subject: Traversing Directories/Searching
- From: Mike Evans <email@hidden>
- Date: Mon, 12 Aug 2002 15:02:09 -0400
Hello
I have an issue with locating files and folders on a unix shared
volume. My preference would be to use a Sherlock 2
search (folder to search) (string to search for) but the ability to
specify a subdirectory as the top level of a search is if the volume
has been indexed by Sherlock. because the volume does not come off of
an Apple server I can't index it.
Currently I am doing a a very laborious repeat loop to test for the
presence of the files/folders I need to find. I should note that I know the
hierarchal depth of the items I am searching for so in this instance I need
to find folders two levels down.
set foundAd to false
repeat with eachDirectory in theDirectories
set theSubs to every folder in eachDirectories
repeat with eachSub in theSubs
if exists (folder (search string) of eachSub) then
open folder(search string) of eachSub
set foundAd to true
exit repeat
end if
end repeat
if foundAd is true then exit repeat
end repeat
This code works but it is very slow and I don't want to have to
increase the search criteria in order to better pinpoint the possible
locations.
Any suggestions anyone might have that could make this task slicker
and quicker would be greatly appreciated.
--
Mike Evans
IT Manager/Systems Administrator
Cyclone Integrated
7110 Pacific Circle
Mississauga, Ontario
L5T 2A6
Canada
T: 905.670.5212
F: 905.670.4979
E: email@hidden
_______________________________________________
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.