Robert Covington wrote: > > > This is probably a FAQ... Do we have a FAQ posted yet? > > How can one automatically gain the FSSpec of the folder an FB > application is in, for passing such to usr ScanFolder(fScan) as > fScan.ScanSpec? > > startRef% = System(_AplVol) seems an easy enough beginning point. This > is for Carbon/OSX > > This particular app scans and shows whatever folder it is in so it needs > the home FSSpec to start itself scanning. > If you are working with the Appearance runtime you can do the following: FN FSMakeFSSpec( SYSTEM( _aplVRefNum ), SYSTEM( _aplParID ), "Your File", theSpec ) Otherwise, you can try: Clear Local Mode Local Fn GetAppSpec( appSpec As ^FSSpec ) Dim err As Long Dim psn As ProcessSerialNumber Dim info As ProcessInfoRec err = Fn GetCurrentProcess( psn ) Long If err = _noErr Def BlockFill( @info, Sizeof(ProcessInfoRec), 0 ) info.processInfoLength = 60 info.processAppSpec = appSpec err = Fn GetProcessInformation( psn, info ) End If End fn // test Dim f As FSSpec Fn GetAppSpec( f ) Print f.name Include "Subs Quick Event Loop.Incl"