Re: Determing the Size of a File
Re: Determing the Size of a File
- Subject: Re: Determing the Size of a File
- From: Michelle Steiner <email@hidden>
- Date: Wed, 2 May 2001 14:07:17 -0700
On 5/2/01 10:18 AM, email@hidden
<email@hidden> wrote:
>
Is there any possible routine I could use to display the size of a file in a
>
human readable form (For example 1.5 Megs etc.)
tell application "Finder"
set the fileSize to the size of item 1 of the selection
end tell
set the units to "bytes"
if fileSize is greater than 1024 then
set the fileSize to my roundit(fileSize / 1024)
set the units to " kilobytes"
end if
if the fileSize is greater than 1024 then
set the fileSize to my roundit(fileSize / 1024)
set units to " megabytes"
end if
display dialog "The file is " & fileSize & space & units
to roundit(inputsize)
return (round inputsize * 10) / 10
end roundit
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------