Re: script to delete .html files from a folder
Re: script to delete .html files from a folder
- Subject: Re: script to delete .html files from a folder
- From: Michelle Steiner <email@hidden>
- Date: Fri, 5 Nov 2004 10:42:39 -0700
On Nov 5, 2004, at 10:20 AM, Courtney Schwartz wrote:
This seems to be one of the most common errors... presenting a string that contains a path, instead of a file alias data type (Finder uses file aliases, not strings). Hence Michelle's coercion "as alias".
Roger's problem wasn't that he used a string. He didn't use a string when moving the file; see the line of code I copied from his message:
move file theFileNameText in folder thePath to trash
The problem is that he didn't traverse the files backwards from the end.
here is a pseudocode example:
set a_list to {1,2,3,4}
repeat with i from 1 to count a_list
remove item i from the list
end repeat
Iteration list at start list at end
1 {1,2,3,4} {2,3,4}
2 {2,3,4} {2,4}
3 {2,4} Error; there is no item 3.
--
Are you better off today than you were on Jan 20th, 2001?
_______________________________________________
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