🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1631

Re: Get File Size in Bytes - Silly Question

#1631
From: Remy Lebeau (TeamB)
Date: Mon, 09 Jul 2007 17:07
16 lines
1395 bytes
"Robert G. Hoover" <not.a.real.address@anywhere.sorry> wrote in message
news:46923739@newsgroups.borland.com...

> How can I get the size of a file in bytes given it's absolute filename?

You have two options:

1) open the file with CreateFile() and then query the size with
GetFileSize().

2) if you do not want to open the file, then use FindFirstFile() instead.
The file size is part of the returned WIN32_FIND_DATA structure.


Gambit
Technical Details
Message-ID: <46926b41$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46923739@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,82a41b4848349c2f
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46923739@newsgroups.borland.com>
Subject: Re: Get File Size in Bytes - Silly Question
Date: Mon, 9 Jul 2007 10:07:20 -0700
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.82.252.126
Message-ID: <46926b41$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1184000833 75.82.252.126 (9 Jul 2007 10:07:13 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail