• 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: Alias List or Repeat in 8.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Alias List or Repeat in 8.1


  • Subject: RE: Alias List or Repeat in 8.1
  • From: Joe Kelly <email@hidden>
  • Date: Wed, 19 Dec 2001 20:58:14 -0800

Bryan wrote:
> -- sets path to a folder on the desktop
> set DeskPath to the path to desktop as string
> set SourceFolder to (DeskPath & "test:") as string
>

This sets SourceFolder to a string whose contents are "HD:Desktop
Folder:test:". You probably meant to do this instead:

set SourceFolder to ((path to desktop as string) & "test:") as alias

Now SourceFolder is an alias to your folder.

> -- counts the folders in SourceFolder, it runs the script for each
> folder inside SourceFolder
>
> repeat with m from 1 to length of SourceFolder
> set SubFolder to (SourceFolder & item m of SourceFolder) as text

I don't know if AppleScript by itself can count items in folders, so you
should wrap your repeat loop in a tell app finder block:

tell application "Finder"
repeat with SubFolder in SourceFolder
UploadSubFolderContents(SubFolder) of me -- Fetch code goes
in this handler.
end repeat
end tell

I think the "repeat with variable in container" works with 8.1, but if it
doesn't do this:

repeat with SubFolder from 1 to count of SourceFolder

have fun
joe


  • Prev by Date: Alias List or Repeat in 8.1
  • Next by Date: Re: Document Conversion
  • Previous by thread: RE: getting Explorer to download New York Times every day
  • Next by thread: RE: Alias List or Repeat in 8.1
  • Index(es):
    • Date
    • Thread