Mac OS Terminal Zip Command – Run from Omnis
Another question on this…
Does anyone know why Test.df* works in a file path for zipping files but Te*.csv or *.csv does not?
I am trying to get it to zip only selected files in my folder.
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf Of Michael Mantkowski
Sent: Monday, November 20, 2017 9:36 AM
To: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Subject: RE: Mac OS Terminal Zip Command – Run from Omnis
Good morning…
Kelly put me on to the answer (or at least an answer in case there is more than one.).
This works.
Do FileOps.$converthfspathtoposixpath(lvBackupFiles,lvBackupFiles)
Do FileOps.$converthfspathtoposixpath(lvBackupZipFile,lvBackupZipFile)
Calculate lvCommand as con(‘do shell script ‘,kDq,’zip -r
‘,kSq,lvBackupZipFile,kSq,’ ‘,kSq,lvBackupFiles,kSq,kDq) ;; Use Built In
Zip
Do $runapplescript(lvCommand,lvResponse) Returns lvError
The key was the Single Quotes around the paths. Do not escape the spaces, that causes the error again.
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf Of Michael Mantkowski
Sent: Friday, November 17, 2017 4:05 PM
To: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Subject: Mac OS Terminal Zip Command – Run from Omnis
I can run th efollowing command in OSX Terminal and it will create a Zip file of all the files in the Pictures folder.
Zip -r “Desktop/Omnis 4321/Test.zip” “Desktop/Omnis 4321/Pictures”
However, when I try to do it from Omnis with the below code I get
lvError=1753 (Script Error). I suspect it has to do with the Quotes. Tried several variations but no luck. Any ideas?
Begin text block
Text: do shell script ” Zip -r “Desktop/Omnis 4321/Test.zip” “Desktop/Omnis 4321/Pictures”” (Carriage return) End text block Get text block lvText Do
$runapplescript(lvText,lvReturn) Returns lvError
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com