Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: File Size

  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    iran
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File Size

    Hello to All
    I want to get fileSize of an image By Javascript!
    is that possible ?
    and if not, in which language i can do it?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Offline in IE
    Code:
    fso = new ActiveXObject("Scripting.FileSystemObject")
    fso.GetFile('C:\\some_file.ext').size
    From the web I don't know of anything. There was a thread on this forum a few months back where someone was roughly detecting conection speed by timing how long an image of a specific size took to download. You might be able to use that then compare it to your files download time to get a rough idea. Just a guess and it won't be acurate.

    <edit> included missing quotes in GetFile </edit>
    Last edited by Graeme Hackston; 04-05-2003 at 03:28 AM.

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    iran
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for guide
    Can u give me that URL
    I can't found it

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did a search and couldn't find it either but I found this

    http://www.brothercake.com/scripts/modemspeed.php


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •