• 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: Determing the Size of a File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determing the Size of a File


  • Subject: Re: Determing the Size of a File
  • From: Scott Earleywine <email@hidden>
  • Date: Wed, 02 May 2001 18:46:55 -0500

Is there a way to make this a droplet?

I pasted the code, but when I run it...the file I had selected (obviously)
deselects and the script 'checks' the compiled script's size.

<sorry if this is a dumb question...I'm new>

Thanks!
SLE

--
Scott Earleywine
email@hidden
http://www.bigfoot.com/~earleywine_scott/

> From: Michelle Steiner <email@hidden>
> Date: Wed, 2 May 2001 14:07:17 -0700
> To: <email@hidden>
> Subject: Re: Determing the Size of a File
>
> 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. |
> ----------------------------------------------------------------------
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Follow-Ups:
    • Re: Determing the Size of a File
      • From: hciR nellA <email@hidden>
References: 
 >Re: Determing the Size of a File (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Determing the Size of a File
  • Next by Date: Sending commands to the finder
  • Previous by thread: Re: Determing the Size of a File
  • Next by thread: Re: Determing the Size of a File
  • Index(es):
    • Date
    • Thread