Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6187
| From | Richard Ashbery <basura@invalid.addr.uk> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Basic - establishing a directory |
| Date | 2020-09-23 17:42 +0100 |
| Organization | None |
| Message-ID | <58b4956df9basura@invalid.addr.uk> (permalink) |
| References | <9a3486b458.graham@graham.durain.uk> |
In article <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 > HostFS::HardDisc4.$.Deposits.Trial (ii) if not to establish an > empty directory entitled Trial at that location > 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. Is this any use: Assuming directory name is 'mydir' SYS "OS_File", 17, "SDFS::HardDisc0.$.mydir" TO type% IF type% = 2 THEN PRINT "Directory, mydir already exists" ELSE PRINT "Unable to locate directory, mydir but I'll create one for you." SYS "OS_File",8,"SDFS::HardDisc0.$.Mydir" The path (eg. "SDFS::HardDisc0.$.mydir") is set up for my Raspberry Pi and will have to be altered for your machine. Richard
Back to comp.sys.acorn.programmer | Previous | Next — Previous in thread | Find similar | Unroll 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