Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using list of indices



Title: Using list of indices
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
   set idx to {}
    repeat with i from 1 to c1
       if item i of names1 is not in names2 then
           set idx to idx & i
       end if
   end repeat
   
    try
       repeat with i from 1 to (count of idx)
            set label index of file (item i of idx) of folder1 to 5
        end repeat
   end try

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?

Thanks in advance!

--
Ken Fleisher

Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.

Phone: (202) 712-7471
email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.