Hello,

I’am changing the filesystems in my applications from FSSpec to FSRef

But I don’ find how to write an read a file to and from a fix location (in the case of my example HD:soft:Optimafiles)
presuming that the folder (Optimafiles) already exist.
I used to do this with the folowing code using FSSpec

I presume I have to get first the @parentFolderRef somehow to be able to write the file testfile in HD:soft:Optimafiles

Some guide would be great

Piet

PS, I already adapted my application for saving en reading from a choosable location using File$
and also the opening procedure for doubleclicking files,... that’ already works fine

'*******************
dim as FSSpec fileadres

DIM 10 NU$,50 OM$
DIM I%


Appearance WINDOW 1,"TESTVENSTER",(30,50)-(700,800),_Dialogmovable,0,32768

fn FSMakeFSSpec( 1, _fsRtDirID, "HD:soft:Optimafiles:testfile", @fileadres )

def open "WDATWAPL"
open "O", 1, @fileadres
close
NU$="123456"
OM$="Omschrijving"+space$(30)
open "R", 1, @fileadres,46
RECORD 1,1
write #1,NU$;7,OM$;36
close

do
HandleEvents
until ( gFBQuit )
'*******************

--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@...