Relative File Name

Mike Brown mike at cyber-ny.com
Sat Feb 15 12:22:01 EST 2003


Hi Scott,

I am not sure if this is what you were asking, but for getting files stored
in a folder relative to my stack I do the following.

I get the filename of my Rev stack or App and store the location in a
variable such as gStackLoc.  You have to delete the last item of the
filename from the variable because that will be the actual name of your
stack.  I do that by scripting:

Global gStackLoc
Put the filename of this stack into gStackLoc
Set the itemdelimiter to /
Delete the last item of gStackLoc

That way when I look for a file that is always stored in a folder relative
to my stack location I can add the path to the end the variable like this:

Get file gStackLoc & "/images/image1.gif"

Or

Global gFileLoc
Put gStackLoc & "/images/image1.gif" into gFileLoc
Get file gFileLoc

Maybe somebody out there has a simpler method for this, if not I hope this
info is helpful.

Best,
Mike

Mike Brown
Cyber-NY Interactive
212-475-2721
1-888-70-CYBER
mike at cyber-ny.com


On 2/15/03 11:48 AM, "Scott Slaugh" <xslaugh at hotmail.com> wrote:

> I have a stack with several images in it that I would like to store in an
> external file.  Instead of having the filename of of the images then point
> to the exact location of a file, I would like to have them point just to a
> folder and the image name.  For example, if I have a folder called images, I
> want to be able to set the filename to "images/image1.gif," rather than
> something like "c:\program\images\image1.gif."  Is there any way to do this?
> 
> Scott Slaugh
> 
> _________________________________________________________________
> Tired of spam? Get advanced junk mail protection with MSN 8.
> http://join.msn.com/?page=features/junkmail
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list