# Tools plugin 1.6 (including zip & unzip)

**URL:** <https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208>\
**Category:** Classic Servoy\
**Created:** [February 7, 2004, 2:24pm UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208 "2004-02-07T14:24:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [February 7, 2004, 2:24pm UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/1 "2004-02-07T14:24:03Z")

</div>

The very first plugin for Servoy now reached it’s 6th revision.

I added zip and unzip functions and a function to mirror a text.

Have fun with it and check out my second (Splash) plugin to show a splash screen…

The tools plugin now holds the following **SEVENTEEN** functions:

**FILES**  
1.zip  
zip a (single) file, not a folder.

2.unzip  
unzip a file or a group of files, not a folder.

**ENCRYPTION**

1. encrypt  
java DES encrypt a string with an optional user key.

2. decrypt  
decrypt a string previously encrypted with the above function.

**CALCULATION**

1. getMaxDay  
returns the last day of the given month.

2. getIT2Be  
returns my name, email and GSM.

**(STRING) FORMATTING**

1. dateFormat  
very much like the Java dateFormat class to convert a date to a string and the other way around with (or without) a formatting string.

2. numberFormat  
formats the (localized) number to the formatString.

3. secondsFormat  
to make a number of seconds a string and the other way around. formatting like HH:mm:ss.

4.Mirror  
reverse a string M-^QmirrorStringM-^R into M-^QgnirtSrorrimM-^R.

**VALIDATION**

1. isEmail  
based on a method I posted earlier on this forum now available in this plugin. It takes a string with one or more email adresses and checks if the format is correct.

2. isExpired  
takes a year, month and (optional) day and returns a boolean when expired. Can be used to check the expiration date of a credit card.

3. isInteger  
returns a boolean value, checks a string.

4. isInRange  
takes dates, numbers/integers and strings and returns true or false.

- dates: dates need to be set with new Date() not a db timestamp
- string: there is an option to be set to true if you want to ignore cases

1. isModulus10  
takes a string, filters all numbers and tells you the result of a modulus10 check. Can be used to check a credit card number.

2. isNumber  
returns a boolean value after checking a string.

- localized but will return false when you input thousand seperators.

1. isTextOnly  
takes a string and returns false if it finds numbers.

The result is attached. Just drop it in your plugins folder and restart Servoy.

REMARK: When you missed version 4 please read the remarks about the old version.

Feel free to use it and distribute it but give me credit for it.  
The plugin is free, provided M-^Qas isM-^R and I can not take any responsibility for the way it behaves or works.

**And I would really like some feedback on (most) wanted functions. Maybe in the direction of validation…**

Cheers

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [February 8, 2004, 3:22pm UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/2 "2004-02-08T15:22:56Z")

</div>

Hi Marcel, I wanted to try this one, but  
the file you are presenting here,contains the splash-plugin!

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [February 8, 2004, 5:43pm UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/3 "2004-02-08T17:43:54Z")

</div>

What don’t you like my splash plugin ![:lol:]( "Laughing")

I was already afraid there was something wrong because things went wrong this afternoon too when I tried to build another jar.

I uploaded a new version the other minute… The old one is deleted…

---

<div class="post-metadata">

**Author:** ![IT2Be](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@IT2Be](https://forum.servoy.com/u/IT2Be)\
**Post date:** [February 11, 2004, 10:20am UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/4 "2004-02-11T10:20:20Z")

</div>

Anyone using or intending to use the zip/unzip functions?

I added the following for them:

- possibility to read/write folders
- renaming if name exists (’ 1’, ’ 2’ etc.)
- throw away extentions ‘.app’ (os x) and ‘.exe’ (win) when zippin’
- always zip/unzip into the same directory (no out directory choice anymore)
- possibility to delete original after zip/unzip

I now concider adding a window with a progressbar. Anyone happy/unhappy with this and any additional suggestions

btw the above additions are not yet released…

---

<div class="post-metadata">

**Author:** ![irennie](https://avatars.discourse-cdn.com/v4/letter/i/848f3c/32.png) [@irennie](https://forum.servoy.com/u/irennie)\
**Post date:** [December 3, 2010, 3:51pm UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/5 "2010-12-03T15:51:26Z")

</div>

I am using the latest IT2BE tools plug-in (3.4-241) to zip files and folders. I am finding a problem where the zip function fails when a folder or file name contains the characters ‘app’. For example, the folder I want to zip is in the Servoy/application\_server path. This fails because of the ‘app’ in application\_server. If I change the name to something without ‘app’ in it then it works OK.

Could this have something to do with the above quote:

> - throw away extentions ‘.app’ (os x) and ‘.exe’ (win) when zippin’

---

<div class="post-metadata">

**Author:** ![irennie](https://avatars.discourse-cdn.com/v4/letter/i/848f3c/32.png) [@irennie](https://forum.servoy.com/u/irennie)\
**Post date:** [December 7, 2010, 9:00am UTC](https://forum.servoy.com/t/tools-plugin-1-6-including-zip-unzip/1208/6 "2010-12-07T09:00:20Z")

</div>

For your information, this issue is fixed in the next release of the Tools plugin 3.4-242 which has currently been released as a Beta.
