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
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