Hi-
i’m having TONS of trouble copying an image file from the Resources folder of my app to /tmp. i’ve tried lots of code variations using POSIX path, quoted form of, etc - all giving different errors. Here is my current broken code:
property imageBackgroundPath : “Contents/Resources/imagebackground.jpg”
set moveBackground to POSIX path of ((“cp " & (path to me) & imageBackgroundPath & " /tmp”) as string)
do shell script moveBackground
this code puts a ‘/’ before the ‘cp’. A large part of the problem is that there are spaces in (path to me). i just need to copy the files and i’d like to not involve Finder copy if possible. is there a better (or simply correct) way to do this?