Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Richard Ashbery Newsgroups: comp.sys.acorn.programmer Subject: Re: Basic - establishing a directory Date: Wed, 23 Sep 2020 17:42:19 +0100 Organization: None Lines: 28 Message-ID: <58b4956df9basura@invalid.addr.uk> References: <9a3486b458.graham@graham.durain.uk> X-Trace: individual.net gvn7kLEI3nOZcFve4zslMgpEnJNAo5dsyc7lDKy7T7ZfHIiM/3 X-Orig-Path: uwclub.net!richard.ashbery Cancel-Lock: sha1:9ljoBZPwmZbLni7wu9eaTP+Mamc= User-Agent: Pluto/3.16 (RISC OS/5.27) NewsHound/v1.52-32 Xref: csiph.com comp.sys.acorn.programmer:6187 In article <9a3486b458.graham@graham.durain.uk>, Graham Pickles 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