How can i zip the contents of a folder using command line argument.
I dont prefer to use 3rd party batch file.
I have a folder named “folder1” conmprising of folders 1,2,3,…
I want to zip the contents into folder1.zip file.
If i zip the folder1 , the zip file contains from folder1 .
i.e, the zip file when extracted will have folder1/folder1/(contents of the folder)
I just need to get the contents of the folder1 in the zip file.
i.e, the zip file when extracted should have folder1/(contents).
i would be happy if i can the solution in form of an ant target.
Wating for reply .
Thanks in advance.
Sachin.
Why don’t you simply use the ant
<zip>task for that:This will zip the contents of the
folder1/folder[1-3]directories into the directoryfolder1in theexample.zipfile.EDIT: Updated to reflect the changes to the question.