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


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

Re: Basic - establishing a directory

From Graham Pickles <graham@durain.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: Basic - establishing a directory
Date 2020-09-24 09:29 +0100
Organization Aioe.org NNTP Server
Message-ID <7627ecb458.graham@graham.durain.uk> (permalink)
References <9a3486b458.graham@graham.durain.uk> <532e8fb458.Alan.Adams@ArmX6.adamshome.org.uk> <58b4970e7fbasura@invalid.addr.uk>

Show all headers | View raw


In message <58b4970e7fbasura@invalid.addr.uk>
          Richard Ashbery <basura@invalid.addr.uk> wrote:

>In article <532e8fb458.Alan.Adams@ArmX6.adamshome.org.uk>, Alan
>Adams
><alan@adamshome.org.uk> wrote:
>> In message <9a3486b458.graham@graham.durain.uk> Graham Pickles
>>           <graham@durain.uk> wrote:
>
>> > Computer System is on a Laptop Lenovo using RISCBOOKQUAD using
>> > Windows Pro 7. RISCOS 4.02. Programming in Basic.
>
>> > I want to WITHIN a Basic program (i) check whether a particular
>> > directory is present at for instance
>> >
>> > (ii) if not to establish an empty directory entitled Trial at
>> > that location HostFS::HardDisc4.$.Deposits.Trial
>
>> > Getting old aren't we all! Probably quite simple but for some
>> > reason it's eluding me. Can anyone produce suitable Basic or
>> > point me in the right direction.
>
>> > Sorry if this is really trivial.
>
>> *cdir HostFS::HardDisc4.$.Deposits.Trial will create it if it
>> doesn't exist, and doesn't error if it did exist.
>
>Its simpler but I do like a bit more information and is where...
>SYS "OS_File", 17, "SDFS::HardDisc0.$.mydir" TO type%
>comes into its own. SWI returns 0 if object can't be found. If object
>exists and returns 2 then its a directory and 1 if its a file.
>
>Richard
>
Yes, I think it is probably a bit wiser not to ignore the fact that the
directory may already exist. My excuse is that I'm trying out an idea
and don't expect anyone else to use my program at present. If my idea is
successful then I will revamp to make it as a proper fully thought out
program unlikely to mislead others or myself in the future!

Thanks for the info. Have not used SYS "OS_File",17 before.

Regards,

-- 
Graham Pickles
An idiot with a computer is a faster better idiot. (Rich Julius)

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


Thread

Basic - establishing a directory Graham Pickles <graham@durain.uk> - 2020-09-23 14:56 +0100
  Re: Basic - establishing a directory Alan Adams <alan@adamshome.org.uk> - 2020-09-23 16:34 +0100
    Re: Basic - establishing a directory Graham Pickles <graham@durain.uk> - 2020-09-23 16:56 +0100
    Re: Basic - establishing a directory Richard Ashbery <basura@invalid.addr.uk> - 2020-09-23 18:00 +0100
      Re: Basic - establishing a directory Graham Pickles <graham@durain.uk> - 2020-09-24 09:29 +0100
        Re: Basic - establishing a directory Alan Adams <alan@adamshome.org.uk> - 2020-09-24 10:19 +0100
          Re: Basic - establishing a directory Theo <theom+news@chiark.greenend.org.uk> - 2020-09-24 11:30 +0100
            Re: Basic - establishing a directory svrsig <chris@svrsig.org> - 2020-10-20 09:54 -0700
  Re: Basic - establishing a directory Richard Ashbery <basura@invalid.addr.uk> - 2020-09-23 17:42 +0100

csiph-web