• 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: Trying to get the path to every file in a folder - Help!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trying to get the path to every file in a folder - Help!


  • Subject: Re: Trying to get the path to every file in a folder - Help!
  • From: John Stewart <email@hidden>
  • Date: Thu, 23 Dec 2004 18:06:14 -0500

On 12/23/04 at -0700 Michelle Steiner said this

>tell application "Finder" to set filesList to every file in sourceFolder as alias list


This will error if there is only one file in the source folder.

This won't and you will still have a list of alias in filesList when it's finished.

set sourceFolder to (choose folder with prompt "Select a folder to begin:")
try
    tell application "Finder" to set filesList to every file in sourceFolder as alias list
on error errmsg number errnum
    tell application "Finder"
        if (count of (get every file in sourceFolder)) = 1 then
            set filesList to ((every file in sourceFolder) as alias) as list
        else
            display dialog errnum & ": " & errmsg
        end if
    end tell
end try


 _______________________________________________
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: Trying to get the path to every file in a folder - Help!
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Trying to get the path to every file in a folder - Help! (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Decompiler? (very late reply)
  • Next by Date: Re: Trying to get the path to every file in a folder - Help!
  • Previous by thread: Re: Trying to get the path to every file in a folder - Help!
  • Next by thread: Re: Trying to get the path to every file in a folder - Help!
  • Index(es):
    • Date
    • Thread