Results 1 to 4 of 4

Thread: Length of a File

  1. #1
    amac
    Guest

    Length of a File

    How do I find the length (size) of a file... which is opened with fopen()?

  2. #2
    Megatron
    Guest
    Use the _filelength function.

  3. #3
    amac
    Guest
    alright i figured something out that will kinda work...

    I used fseek() to move the file pointer to EOF... and then used ftell()

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    or use GetFileSize

    PHP Code:
    DWORD GetFileSize(
      
    HANDLE hFile,                   // handle to file
      
    LPDWORD lpFileSizeHigh  // high-order word of file size
    ); 

Posting Permissions

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



Click Here to Expand Forum to Full Width