
Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
On Sep 27, 4:45 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> > So directory A in the jar will be copied to C:/
> >Temp on Windows and /tmp in Unix. Is there any sample code that will
[quoted text clipped - 8 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com
Thanks for the reply. I looked at FetchZips but I don't think it will
meet my needs. I could package my directories/files in a zip instead
of a jar but I need to be able to copy certain directories to one
location and other files to another location based on the file/
directory name.
Are there other things I can try?
craftereric@gmail.com - 27 Sep 2007 23:52 GMT
On Sep 27, 5:46 pm, craftere...@gmail.com wrote:
> On Sep 27, 4:45 pm, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:
[quoted text clipped - 19 lines]
>
> Are there other things I can try?
To expand on what I need the code to do:
For each directory or file in the archive, I need to process it. For
example, the file B/file3.txt would need to be copied to /var/tmp/
file.txt on a Unix machine and C:\Temp\LocalDir on a windows machine.
The entire directory A would need to be copied to /etc/ on Unix and C:
\Program Files\MyDir on Windows
Roedy Green - 28 Sep 2007 00:33 GMT
>For each directory or file in the archive, I need to process it.
Sounds like you need to read up on File.list and FilenameFilters.
See http://mindprod.com/jgloss/file.html
http://mindprod.com/jgloss/filter.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Hunter Gratzner - 28 Sep 2007 00:07 GMT
On Sep 28, 12:46 am, craftere...@gmail.com wrote:
> Thanks for the reply. I looked at FetchZips but I don't think it will
> meet my needs. I could package my directories/files in a zip instead
> of a jar
A jar is a zip.
> but I need to be able to copy certain directories to one
> location and other files to another location based on the file/
> directory name.
Write the code to do it. It is trivial.
> Are there other things I can try?
Read the API documentation.
Roedy Green - 28 Sep 2007 00:31 GMT
>Thanks for the reply. I looked at FetchZips but I don't think it will
>meet my needs. I could package my directories/files in a zip instead
[quoted text clipped - 3 lines]
>
>Are there other things I can try?
I did not intend for you to use FetchZips unmodified. It was to show
you how to use the low-level zip manipulating tools.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Roedy Green - 28 Sep 2007 01:19 GMT
>I did not intend for you to use FetchZips unmodified. It was to show
>you how to use the low-level zip manipulating tools.
You can use the Zip methods to unpack jars. Jars are just zips with a
few magic members.
see http://mindprod.com/jgloss/jar.html
http://mindprod.com/jgloss/zip.html

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com