Domi wrote:

> I have stack with a "scores" field.
> I want to write the scores to a text file *in the same folder*
> Is it possible to get the directory property for a stack, i.e. the
> folder in which it resides?
> Anyway, I have a "answer folder" command, but I want to avoid it...

>From a related post a few weeks ago:

File addressing in MetaCard uses the current directory.  At startup this is
set to the directory containing the running application: MetaCard when in
the integrated development environment (IDE), and the standalone when
running from that. 

You can change the current directory by using:

    set the directory to <path>

where <path> is any valid directory, expressed in UNIX path form (using the
"/" delimiter), and can optionally end in "/".

I like to use a function to determine my app's path that will work in both
the IDE and also as a standalone.  If that approach will help your
circumstance, you can use something like this:

 function AppPath
   put the filename of <mainstackName> into tPath
   set the delimiter to "/"
   delete last item of tPath
   return tPath &"/"
 end AppPath


While the trailing slash is not needed, I add it as a convenience when
concatenating other paths:

  open stack AppPath()&"MyOtherStack.mc"

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any database on any site
 ___________________________________________________________
 [EMAIL PROTECTED]       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc

_______________________________________________
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard

Reply via email to