• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using list of indices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using list of indices


  • Subject: Using list of indices
  • From: "Fleisher, Ken" <email@hidden>
  • Date: Tue, 16 Jan 2007 13:07:25 -0500
  • Thread-topic: 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:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Using list of indices
      • From: kai <email@hidden>
  • Prev by Date: Re: Return Delimiter
  • Next by Date: Text items
  • Previous by thread: Re: Return Delimiter
  • Next by thread: Re: Using list of indices
  • Index(es):
    • Date
    • Thread