Using 'Repeat'
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