John...not sure if you're on MX 6/7...if so...fire up this function in a CFC...little simpler than CFDIRECTORY ;-)
<!---(Function: FileSize)------------------------------------------------------ Date Created: March 12, 2004 Author: Bryan 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> HTH Cheers 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: "Burns, John D" <[EMAIL PROTECTED]> To: "CF-Talk" <cf-talk@houseoffusion.com> Sent: Thursday, April 28, 2005 10:19 AM Subject: RE: Get file size on UNIX? > Yeah, I guess that would work. I was thinking more along the lines of an > OS function or something. I guess I can use cfdirectory with the filter > to check individual files. Thanks for the idea. I've been sick so my > brain isn't altogether here. > > > John Burns > Certified Advanced ColdFusion MX Developer > Wyle Laboratories, Inc. | Web Developer > > > -----Original Message----- > From: James Holmes [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 28, 2005 12:14 PM > To: CF-Talk > Subject: RE: Get file size on UNIX? > > cfdirectory? > > -----Original Message----- > From: Burns, John D [mailto:[EMAIL PROTECTED] > Sent: Thursday, 28 April 2005 11:58 > To: CF-Talk > Subject: Get file size on UNIX? > > I'm not a unix guy so I appologize for the (hopefully) easy question. > What's the easiest way to get the file size of a file that is already > sitting on the server? I need to loop over a list of files and save the > file size and name of each file to a db. Any help that can be offered > would be greatly appreciated. Thanks. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204968 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