[Coco] File size from Disk Basic

Bob Devries devries.bob at gmail.com
Wed Jun 27 18:55:20 EDT 2007


There is a much easier way to find file size.

Use the LOF function!

Opne the file like this:

OPEN"D",#1,"FILENAME.BIN",1
FIELD #1, 1 AS A$
SIZE=LOF(1)
PRINT"FILE SIZE=";SIZE
CLOSE #1

But PLEASE check the above code in your manual. I just got out of bed, and 
typed it off the top of my head.

--
Regards, Bob Devries, Dalby, Queensland, Australia

Isaiah 50:4 The sovereign Lord has given me
the capacity to be his spokesman,
so that I know how to help the weary.

website: http://www.home.gil.com.au/~bdevasl
my blog: http://bdevries.invigorated.org/

----- Original Message ----- 
From: "theother_bob" <theother_bob at yahoo.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Thursday, June 28, 2007 7:44 AM
Subject: Re: [Coco] File size from Disk Basic


> That is pretty much how it's done... count the granules used and subtract 
> the unused portion of the last granule.
>
> While we're on the subject, how hard would it be to incorporate timestamps 
> into the HDB-DOS directory? I think ADOS had this capability.
>
> cheers,
> Bob
>
> ----- Original Message ----
> From: Diego Barizo <diegoba at adinet.com.uy>
> To: CoCo List <coco at maltedmedia.com>
> Sent: Wednesday, June 27, 2007 4:26:37 PM
> Subject: [Coco] File size from Disk Basic
>
>
> Is there any reasonable way of finding out the size of a file from a
> Disk BASIC program?
> The way I'm doing it now involves going into the GAT (Granule allocation
> table) and counting the granules used by that file.... :-(
>
> Diego
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
>
>
> ____________________________________________________________________________________
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.
> http://answers.yahoo.com/dir/?link=list&sid=396545367
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list