Re: file or folder?
Re: file or folder?
- Subject: Re: file or folder?
- From: Arthur J Knapp <email@hidden>
- Date: Mon, 20 Aug 2001 18:44:30 -0400
>
Subject: Re: file or folder?
>
Date: Mon, 20 Aug 2001 08:20:33 -0700
>
From: Michelle Steiner <email@hidden>
>
On 8/20/01 2:55 AM, Ray Phillips <email@hidden> wrote:
>
>
> When a group of files and folders is dragged onto a droplet, what is the
>
> recommended way of determining which items are files and which are folders?
There is a funny little fact about drag-drop: the items that you drag
remain "selected" after you drop them, (assuming that the user didn't
quickly click somewhere else before the script starts up). This means
that you can do this:
on open theFiles
-- forget theItems, work with:
tell app "Finder"
try
set theFiles to every file of selection as list
on error
set theFiles to {}
end
try
set theFolders to every folder of selection as list
on error
set theFolders to {}
end
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://homepage.mac.com/richard23/