Re: Anybody knows
Re: Anybody knows
- Subject: Re: Anybody knows
- From: Jolly Roger <email@hidden>
- Date: Fri, 27 Jul 2001 13:17:53 -0500
On 7/27/2001 1:08 PM, "Jack Morrison" <email@hidden> wrote:
>
Andre martin wrote:
>
>
> Hi
>
> I'm trying to count the number of itens in my desktop folder, but the
>
> number is wrong.
>
> The code that I'm using:
>
>
>
> tell application "Finder" to count items of "desktop folder"
>
> set x to result
>
> display dialog x
>
>
>
> He answers 14, but that's 61 files and folders and aliases....
>
> Is there anything wrong with my code or the word "items" don't refer to
>
> files, folders, aliases... ?
>
> By the way, Anyone knows where there's a great dictionary of applescript?
>
>
>
>
The desktop folder is actually a hidden folder within the root folder
>
of your startup disk.
>
>
Your code should probably read
>
>
tell application "Finder" to count items of folder
>
"Nameofstartupdrive:desktop folder"
>
set x to result
>
display dialog x
Or you could just say:
tell application "Finder" to count items of folder (path to startup disk) &
"Desktop Folder"
Note: If you have more than one hard drive on your system, it is possible
that you have items on the desktop of another drive, and those items
wouldn't be included in this list.
JR