• 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
Getting the length of a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the length of a file


  • Subject: Getting the length of a file
  • From: Emile Schwarz <email@hidden>
  • Date: Fri, 14 Jan 2005 06:54:17 +0100

Hi,


I have troubles with the following code who do not returns the file size in an Integer (or Real) format.


tell application "Finder"
	-- initialize the used variables
	set itemName to ""
	set itemLength to 0.0 -- was originally 0

	-- .../... other code lines removed

	-- get the wanted values (file name and file size)
	set itemName to name of item 1 of front window
	set itemLength to size of item 1 of front window

	-- .../... get the found values
	return itemName & tab & itemLength
end tell


I get:

AppleScriptFinderGuide.PDF	6,7982E+4


I want a 'standard value', not scientific coercion value...


Any idea ?

TIA,

Emile


PS I tried:

set itemLength to (1.0 + (size of item Idx of front window))
set itemLength to (1.0 * (size of item Idx of front window))

without success.


_______________________________________________ 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
  • Prev by Date: Re: Hidden Folders
  • Next by Date: Re: X, Classic, or 9?
  • Previous by thread: Re: X, Classic, or 9?
  • Next by thread: Re: Getting the length of a file
  • Index(es):
    • Date
    • Thread