Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to zip files from SIL Power Scipts

Dennis Henrik Kristensen September 28, 2018

Hi,

NOTE:
Linux Server

I am trying to zip all the scripts made via the SIL Manager (cPrime Power Script). SIL has it's own routine for this - zipFiles (https://confluence.cprime.io/display/SIL/zipFiles).
I want to zip the whole folder with all the scripts in it located here on the server:
/var/atlassian/application-data/jira/silprograms  - as it is set to pr. standard.

I got this reply from SIL support:
Or you can use SIL to zip up the files and send in an email or attach to a ticket.

For now i have not succeded in this. 
The command i use in full looks like this:

boolean test = zipFiles("/var/atlassian/application-data/jira/silprograms", "TestZip.zip");
return test

Also note:
I tried to zip 1 file like this:
boolean test = zipFiles("/var/atlassian/application-data/jira/silprograms/.FileForExport.swp", "TestZip.zip");
return test

This returned true but i cannot find the zip file in on the server.

Any help or suggestions are very welcome.
Thanks in advance.
/Dennis

 

1 answer

1 accepted

1 vote
Answer accepted
Radu Dumitriu
Contributor
September 28, 2018

1. zipFiles zips, surprise!, files, not directories. First argument is an array of files, not an directory. See https://confluence.cprime.io/display/SIL/zipFiles

2. cd /var/atlassian/; find . -name TestZip.zip

 

If you want improvements on that zip behavior, please fill a ticket, thanks !

Dennis Henrik Kristensen September 28, 2018

I went around this with findFiles(). But thanks for the info. Might fill in a form anyway since i believe it would be much more useful if it could take in directories as well. 
Good day sir. 

/Dennis

Radu Dumitriu
Contributor
September 28, 2018

That's great! Have a wonderful day yourself! It's Friday.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events