[futurebasic] Re: [FB] Saving a file to a specified folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2003 : Group Archive : Group : All Groups

From: George Beckman <gbeckman@...>
Date: Wed, 05 Nov 2003 13:13:06 -0800
on 11/5/03 9:49 AM, Richard Goodman at bhomme@... wrote:

> I don't understand where one would use PARENTID, FOLDER, and
> SYSTEM(_aplVol). In fact I don't really understand the difference among
> these. I have read Appendix A until I'm blue in the face. That appendix
> doesn't even mention  SYSTEM(_aplVol).

Richard,

Here is a working example.   It uses fsSpec but you can extract the
filename$ and volNum% if you want to.  I am creating a folder here and then

I bit the bullet and converted to fsSpec and it was well, well worth the
effort.   

> AppFolderRef=System(_aplVol)

> HelpFolderRef=Folder("PGGP Help",AppFolderRef)

> Helperr%=fn FBMakeFSSpec(HelpFolderRef,0,"PGGPHelp.htm",helpFSSpec)

the declarations are like this:

> dim helpFSSpec as fsspec
> dim appFolderRef as Long
> dim HelpFolderRef as Word
> DIm HelpErr%


so the one you wantis either AccFolderRef or HelpFOlderFef...if you are
looking at a folder inside the folder.

If you have a file SPec you can get your name and number:

fileName$= helpFSSpec.name
volRefNum= helpFSSpect.vRefNum

but I have come to love:

OPEN "O",#1,@helpFSSpec

Once I fought it out, I have so much more control over the silly Finder
suddenly deciding it wants to use some odd unheard of folder as the starting
point for an open or save dialog.  This is especially important where
servers are used...because if the server is not there (and you don't
reference it with an alias) the getFile and savefile will default to the
desktop.   The teachers at my 4 schools have the desktops littered with
files and because we are switching rooms due to year round...they can't find
their work half the time.   Alias files (Favorites) in 9.0+ are the
answer...when they remember to use them.

Alias file will resolve into an fsSpec easily.

I will be glad to help you work some of this out if you like.
-- 
Best Wishes,

George
mailto: gbeckman@...
http://www.pggp.com