Having navigated to the correct directory, the following works in Terminal:
7za a MyBackup *.pdf
(this copies and compresses all .pdf files in the directory, and saves them in an archive called MyBackup, in the same directory)
The following doesn't work, and I have tried dozens of permutations, including without the Chr(34)s, from the various posts in the forum on the subject.
Code: Select all
theSubDirs.s = "~/Documents/BusRecs testing/"
...
Case #PB_Event_Gadget
If EventGadget() = #theButton
SetCurrentDirectory(theSubDirs)
theApp.s = "7za a MyBackup *.pdf"
If RunProgram("open", Chr(34) + theApp + Chr(34), "")
MessageRequester("Test", "OK")
Else
MessageRequester("Test", "Problem")
EndIf
EndIf
Any help please ? Many thanks.