0

I am writing a batch file in order to make an .ear file. Here is my code snippet:

winrar.exe a -afzip -m5 -ed -pTest -r -ep1 %earName%.ear %extractDest%*

This code compresses the including files which I don't want. How can I just add the files in the "extractDest" to the .ear file without compressing?

mvp
  • 111,019
  • 13
  • 122
  • 148
samme4life
  • 1,143
  • 2
  • 14
  • 20

1 Answers1

1

You can use command line zip from Info-Zip as follows:

zip -rp0 earname.ear source_dir

-0 means store and don't compress (-r recursive, -p preserve relative path).

Unlike winrar, Info-Zip is open source (no prompts to purchase), and its zip and unzip are true command-line utilities, and very small ones at that.

If you insist on using winrar, you must use option -m0 (instead of -m5), which selects 0 (store) compression level.

mvp
  • 111,019
  • 13
  • 122
  • 148