• 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 'Repeat'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using 'Repeat'


  • Subject: Using 'Repeat'
  • From: email@hidden
  • Date: Sun, 25 Mar 2001 17:12:55 +1000

Hi All,

I am not too clear on using the repeat capabilities in Applescript. The
following script give me the following error: "Finder got an error: Can't
make file "B3761111.123" into a item".

What I am trying to do is move any number of files with similar names to a
new folder.

tell application "Finder"
set test_folder to "Macintosh HD:test folder:"
set test_folder2 to "Macintosh HD:test folder2:"
set file_list to list folder test_folder
set search_term to "376"
repeat with an_item in file_list
if an_item contains search_term then
move file an_item to test_folder2
end if
end repeat
end tell

Any idea's appreciated.

Regards,

Peter


  • Follow-Ups:
    • Re: Using 'Repeat'
      • From: "Christopher C. Stone" <email@hidden>
  • Prev by Date: Re: CGIs with OSX
  • Next by Date: Re: CGIs with OSX
  • Previous by thread: Re: Coomand Line in OSX [Was: Re: AppleScript and UNIX: Together at last!]
  • Next by thread: Re: Using 'Repeat'
  • Index(es):
    • Date
    • Thread