Thanks Robert, This was the little missing link, Now it's working fine. Bye Piet (Belgium) > Piet en Claudine wrote: > >> 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 > >> fn FSMakeFSSpec( 1, _fsRtDirID, "HD:soft:Optimafiles:testfile", >> @fileadres ) >> open "O", 1, @fileadres >> close > > include "Util_FileDirectory.incl" > dim as CFStringRef parentPath > dim as FSRef parentRef > dim as OSStatus err > > parentPath = fn CFSTR( "/Volumes/HD/soft/Optimafiles" ) > err = fn FD_PathGetFSRef( parentPath, 0, @parentRef ) > if ( err ) then stop "FD_PathGetFSRef error " + str$( err ) > open "O", 1, "testfile", parentRef > close > > Robert P. >