Is it possible to copy a .app file into the applications folder?
and then run that application.
I have tried the following to copy but it fails!
Code: Select all
Sourcefile.s = GetUserDirectory(#PB_Directory_Documents) + "Temp/My New.app"
DestinationFile.s = GetUserDirectory(#PB_Directory_Programs) + "My New.app"
NSFM = CocoaMessage(0, 0, "NSFileManager defaultManager")
CocoaMessage(0, NSFM, "copyItemAtPath:$", @sourceFile, "toPath:$", @destinationFile, "error:", #nil)
I can do it with terminal commands
cd /Applications
cp -r /Users/MyName/Documents/Temp/MyNew.app MyNew.app
But using filberts AppleScript how do I combine the two commands?
I add Do Shell Script to each to no avail.
CD