Re: Using list of indices
Re: Using list of indices
- Subject: Re: Using list of indices
- From: kai <email@hidden>
- Date: Tue, 16 Jan 2007 18:46:11 +0000
On 16 Jan 2007, at 18:07, Fleisher, Ken wrote:
Hello. I have a list of indices for files in a folder and am
looking for a better way to perform an action on just those files.
Here is what I am doing now (which is inside a tell application
“Finder” block):
-- Compare the two folders
setidxto {}
repeatwithifrom 1 toc1
ifitemiofnames1is notinnames2then
setidxtoidx & i
endif
endrepeat
try
repeatwithifrom 1 to (countofidx)
setlabel indexoffile (itemiofidx) offolder1to 5
endrepeat
endtry
Note that the variables names1 and names2 are not the file names
from the files in the two folders, but rather parsed versions of
the file names. (They must be parsed before comparison.) After I do
the comparison, I need to related the found indices to the files
themselves.
I’m looking for a way to perform either or both of the above steps
with the loop. For example, I know I can say:
set label index of every file of folder1 to 5
How can I do that with just specific files?
Try something like this, Ken:
----------
setidxto()
repeat with i from 1 to c1
if item i of names1 is not in names2 then set idx's end to i
end repeat
tell application "Finder"
set label index of folder1's files whose index is in idx to 5
end tell
----------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden