• 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: script to delete .html files from a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: script to delete .html files from a folder
      • From: "Adam K. Wuellner" <email@hidden>
References: 
 >script to delete .html files from a folder (From: Roger Donaghy <email@hidden>)
 >Re: script to delete .html files from a folder (From: Michelle Steiner <email@hidden>)
 >Re: script to delete .html files from a folder (From: Courtney Schwartz <email@hidden>)

  • Prev by Date: Re: Somewhat OT
  • Next by Date: Re: script to delete .html files from a folder
  • Previous by thread: Re: script to delete .html files from a folder
  • Next by thread: Re: script to delete .html files from a folder
  • Index(es):
    • Date
    • Thread