Extract a JAR file, possibly with WINRAR on CL
I need to be able to extract jar files on the command line.
Piece of cake, you might say. Yes, except I need the extractor to rename same-named files. To be specific, the Jar file has a file named:
classAX.class
and another named:
classax.class
in the same directory. I need it to extract them both, and preferably rename one:
classax (2).class
or something similar.
It must be able to do this without any user intervention.
Winrar has this capabi开发者_开发知识库lity, but when attempting to extract with unrar.exe, it says that the input file is not a valid RAR archive. (Though winrar has jar capabilities.)
Any way to force winrar to accept jars via command line, or perhaps another program?
Thanks,
~Kurt Nauck
You can develop your own programme in java, there is a Zip package that can deal with compressed files, an also you can deal with a rest of your needs
7Zip command line util accomplishes this perfectly. Thanks for the answers.
精彩评论