• 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
Re: Labelling identically-named files in two Finder folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Labelling identically-named files in two Finder folders


  • Subject: Re: Labelling identically-named files in two Finder folders
  • From: peter boardman <email@hidden>
  • Date: Tue, 1 Feb 2005 09:04:25 +0000

Christopher Nebel <email@hidden> said on 2005-01-31, 13:27 (-0800 GMT):

> On Jan 31, 2005, at 11:05 AM, has wrote:
>
> > peter boardman wrote:
> >> I want to compare two folders and label any files that appeared in
> >> both (names the same, not bothered about comparing anything else).
> > This should work:
> > tell application "Finder"
> >     set folder1 to folder "Path:To:First:Folder"
> >     set folder2 to folder "Path:To:Second:Folder"
> >     set label of every file of folder1 whose name is in (get name of
> > every file of folder2) to 5
> >     set label of every file of folder2 whose name is in (get name of
> > every file of folder1) to 5
> > end tell
>
> And so it does, but it (the explanation, not the script) has the
> disadvantage of skipping straight to the solution.  Let's look at this
> in a bit more detail:
>[great explanation]

Thanks Chris.

I think I also made the mistake of first trying to build a list, then filtering it. You can’t filter lists, can you:

 set l to {1, 2, 3, 4, 5, 6, 7, 8, 9}
 get every item of l where...

Since didn’t work, I did it the hard way.

Once I’d taken the wrong road, alternative routes became harder to see!

Pete
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Labelling identically-named files in two Finder folders
      • From: Christopher Nebel <email@hidden>
  • Prev by Date: Re: Code for applications not already installed
  • Next by Date: Automate alerts after command in Akua Sweets
  • Previous by thread: Re: Code for applications not already installed
  • Next by thread: Re: Labelling identically-named files in two Finder folders
  • Index(es):
    • Date
    • Thread