Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #306

Re: Reading Date Stamp of a file

From Roger Darlington <rogerarm@freeuk.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: Reading Date Stamp of a file
Date 2011-05-18 13:44 +0100
Organization home
Message-ID <d61650d551.rogerarm@rogerarm.freeuk.com> (permalink)
References <416aadd251.rogerarm@rogerarm.freeuk.com> <e07bb1d251.graham@durain.demon.co.uk>

Show all headers | View raw


On 13 May 2011, Graham Pickles  wrote:
> In message <416aadd251.rogerarm@rogerarm.freeuk.com>
>           Roger Darlington <rogerarm@freeuk.com> wrote:


>> In BBC BASIC/RISC OS there is always more than one command to perform
>> any one function.

>> Could the readers tell me which is the SIMPLEST command to use to read
>> the date stamp of a file within a program, and in what format is the
>> date stamp returned?  I don't need the time stamp, just the date. (I
>> realise I may get both date and time anyway).

> How about


> DIM stamp% 5,date% 32
> REM next line is up to you...
> filespec$="HostFS::HardDisc4.$.Folders"
> SYS "XOS_File",17,filespec$ TO found%,,load%,exec%
> stamp%!0=exec%:stamp%?4=load%

Well, I have run with this one.

Here's the program I have:

FOR loop to get different files

load%=0 : exec%=0 : length%=0

filespec$="<Obey$Dir>"  +  "."  +  AZletter$ + "." + SubName$ + "." + 
SubName$ + "/htm"

filespec$="HostFS::HardDisc4.$.~IYO4.Default.Sep03.!WildFlowers.Flowers"  
+  "."  +  AZletter$ + "." + SubName$ + "." + SubName$ + "/htm"

PRINT filespec$

SYS"OS_File",17,filespec$ TO found%,,load%,exec%,length%

PRINT ~load%, ~exec%, length%'

NEXT


GIVES THE FOLLOWING PRINTOUT:

Note that I have deleted the XOS_File and used OS_File, so as to prove 
it never errors.

HostFS::HardDisc4.$.~IYO4.Default.Sep03.!WildFlowers.Flowers.A.Aconite(Winter).A 
conite(Winter)/htm
         0   3834830  29368192

The load address is always '0', the exec address is always &3834830 
and the size is always 29368192bytes.


for every file it comes across (BTW the files it comes across are only 
of order 30kB in size, NOT 29MB!!)











-- 

Cheers
Roger
My friends think I'm surreal, but I've never been near a sword

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Reading Date Stamp of a file Roger Darlington <rogerarm@freeuk.com> - 2011-05-13 10:55 +0100
  Re: Reading Date Stamp of a file Roger Darlington <rogerarm@freeuk.com> - 2011-05-13 11:20 +0100
    Re: Reading Date Stamp of a file Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-05-14 03:10 +0200
  Re: Reading Date Stamp of a file Graham Pickles <graham@durain.demon.co.uk> - 2011-05-13 11:39 +0100
    Re: Reading Date Stamp of a file jgh@arcade.demon.co.uk (Jonathan Graham Harston) - 2011-05-14 00:35 +0100
    Re: Reading Date Stamp of a file Roger Darlington <rogerarm@freeuk.com> - 2011-05-18 13:44 +0100
      Re: Reading Date Stamp of a file Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-05-18 15:23 +0100
        Re: Reading Date Stamp of a file Roger Darlington <rogerarm@freeuk.com> - 2011-05-19 09:30 +0100
          Re: Reading Date Stamp of a file druck <news@druck.org.uk> - 2011-05-19 21:14 +0100

csiph-web