Access Resource Files

JB sundown at
Fri Sep 20 05:11:54 EDT 2019

Hi Klaus,

Thanks for the info!  A file path alone does not work for me.

Here is what I have tried.

In the Stack Script;

global dirName

on openStack
   put the defaultFolder into dirName
end openStack

—From a button on a card;

global dirName

on mouseUp
  --/Users/JB/Desktop/Buss X-82/Buss
  put dirName & "/Buss" into fPath
  put fPath
end mouseUp

That is how I can get a file path but using this path will not work if the path
directs to a bundle but it will work if the file is not in a bundle.

That being said how do I go about copying this file with specialfolderpath() ?
Do I need to go to the standalone settings and add the file using copy files
section and then from within my app I can copy that file but if I add it my
self after the .app is made I will not be able to copy it?

Are you saying this will return the path to my resource in my app and let
me copy it to the desktop?  Do you have some more examples of copying
the file with this procedure?


> On Sep 20, 2019, at 1:46 AM, Klaus major-k via use-livecode <use-livecode at> wrote:
> Hi JB,
>> Am 20.09.2019 um 10:34 schrieb JB via use-livecode <use-livecode at>:
>> Does anyone know of a way to access resource files
>> in the StandAlone .app bundle?
>> Let’s say I want to include a jpg file in my .app bundle
>> & then copy that file to the desktop at various times.
>> From what I understand if you write a external to copy
>> source file to destination file it will work unless they
>> are in the .app bundle.
>> I do not want to include a file saved in a different url.
>> This will be a file located in the .app bundle and then
>> saved to the desktop or a user chosen location that
>> is not in a bundle.
>> My guess is it cannot be done but I would love it if
>> someone proved me wrong.
>> JB
> everything you add to your standalone via:
> Standalone Application Settings -> Copy files
> can be found in the standalone in:
> specialfolderpath("resources") & "/your wonderful pic.jpg"
> If that is what you mean.
> That specialfolderpath() does also work in the IDE!
> In that case it returns the path to the folder containing the current stack.
> Best
> Klaus
> --
> Klaus Major
> klaus at
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list