Hey Ricky,

try this function:

  <!---(Function: 
FileSize)------------------------------------------------------
  Date Created:   March 12, 2004
  Author:         Phil
  Arguments:      FileLoc - full path of file (string) required
  Purpose:        Gets the size of a file in bytes
  Returns:        File Size in bytes (numeric)
  --->
  <cffunction name="FileSize" returnType="numeric" access="public">

    <cfargument name="FileLoc" type="string" required="Yes">

    <cfset jFileIn = 
CreateObject("java","java.io.File").init(ARGUMENTS.FileLoc)>
    <cfreturn jFileIn.Length()>

  </cffunction>


Enjoy ;-)


Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Tuesday, February 22, 2005 10:30 AM
Subject: Getting File Size with Java


> Can someone help me in getting started in going underneath the Java hood 
> and
> to retrieve a file size of a file sitting on a server.
>
> I know I can do this with cffile, but I want to see what type of 
> performance
> difference the Java class will give me.
>
> Thx!
>
> Ricky Fritzsching
> ------------------------------------------------
> "If debugging is the art of removing bugs, the programming must be the art
> of inserting them"
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195918
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to