Message-ID: <3798C905.8BD03677@pmail.net> Date: Fri, 23 Jul 1999 21:56:53 +0200 From: Fredrick Backman X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: file size References: <99072310052600 DOT 01111 AT dome DOT calderathin DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Greetings Darren, Try the C system call stat() which not only gives you the file size but also when the file was last modified etc. It takes two arguments: a string (the filename) and the address to a structure (struct stat *). The structure field you want is called st_size, which gives the size in bytes. Example: struct stat statbuf; stat("hello.dat", &statbuf); printf("The size of hello.dat is %d\n", statbuf.st_size); Hope that works :-) I know stat() gives more info if you use it on a UNIX system, and I haven't honestly tried it myself in DOS but I can't see why it shouldn't work (some fields in the structure will be useless in DOS but don't worry about that now). cheers Fred Darren Noble wrote: > Does anyone know how to get the size of a file in DJGPP? > > -- > Linux Rules > > Darren 'The' Noble -- Fred Backman Lead Wizard Binary Spells http://www.femmefetish.com/games/