Path: utzoo!attcan!uunet!munnari!murdu!grae From: grae@murdu.OZ (Graeme Gerrard) Newsgroups: comp.sys.mac.programmer Subject: Re: Setting a default folder Keywords: FSGetFile Message-ID: <1479@murdu.OZ> Date: 14 Nov 88 05:53:55 GMT References: <63398@ti-csl.CSNET> Reply-To: grae@murdu.UUCP (Graeme Gerrard) Organization: Comp Sci, Melbourne Uni, Australia Lines: 21 > topaz.rutgers.edu wants to know about setting default directories. From memory, what you need is to get the ioWDDirID of the directory you want as your default. If you only know the NAME of the directory, you can get the ioWDDirID by calling PBHSetVol, passing a WDPBRec with the name in ioNamePtr, ioVRefNum = 0 and ioWDDirID = 0L. Then call PBHGetVol and with the same parameter block and it returns the ioWDDirID of the directory you are after. Now set the global, CurDirStore, to the ioWDDirID, and call SFGet/PutFile. The result is a "set directory" before you get your dialog box up. Disclaimer: Just because this works for me, don't mean it's going to work for you. I can send you a SetDirectory function in C if you mail me. ------------------------------------------- Graeme Gerrard Faculty of Music, University of Melbourne ARPANET: grae@murdu.oz.au -------------------------------------------