CFDIRECTORY will do it, but has the cost of scanning the whole
directory, which may or may not matter. You can also use java.io.File
to do it like this #createObject("java",
"java.io.File").init("/full/path/to/file").length()#, but that
obviously has to be done individually for each file. Both of these
will work cross-platform (i.e. don't depend on *nix), because hey rely
solely on Java.
cheers,
barneyb
On 4/28/05, Burns, John D <[EMAIL PROTECTED]> wrote:
> 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.
>
> John Burns
> Certified Advanced ColdFusion MX Developer
> Wyle Laboratories, Inc. | Web Developer
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 50 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:204945
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