How do I zip, archive, distribute, whatever folders FREE?

How do I zip, archive, distribute, whatever folders FREE?

If you want a cross-platform tool, use jar.exe that comes with the JDK distribution.
Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C dir] files ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-C change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.
Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
files in the foo/ directory into 'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ .
Change to the directory where your classes are, and invoke the jar command as follows
jar -cvf test.jar *
This will include all the path information for all folders(packages) in the current directory.
- Phil

Similar Messages

  • How to ZIP the files and folders/sub folder files using java

    HI All,
    I'm New to this Forum, Could anybody tell me how to zip the files and folders/sub folders using java. For example I have a folder with the name testfolder and side that folder I have some files and some sub folders inside subfolders I have some other files. I need to ZIP the files and folders as they are in same hierarchy.
    Any pointers or help wolud be appritiated.
    Thanks,
    Rajeshbabu V

    [http://www.devx.com/tips/Tip/14049]

  • How do I zip file folders to send to Windows users? They can never open!

    How do I zip file folders to send to PC users, they always have problems and can't open.

    Are you trying to use one of the stuffit formats (like .sitx as you said) or do you actually want to make a .zip file which would be more logical if you are giving it to a windows user (unless they too have stuffit to stuffit expander of course)?
    If you do a search for "zip" at macupdate.com you will find a whole bunch of zip tools, some of which advertise they make windows compatible zip files.  For example BetterZip and WinZip Mac Edition can make windows-compatible zip files.
    As I initially mentioned if you have stuffit and the windows receiver has stuffit (or stuffit expander) I don't know why there would be a problem creating a stuffit file on a mac and expanding it on windows (ignoring any possible problems introduced in the method of transmission).

  • How to recover a zip archive?

    Dear all,
    I'm trying to open a zip archive I created but I've got the message "Error 1-Operation not permitted".
    I don't know if it is corrupted or something else. It's an archive with 3 or 4 mov and wmv files on it.
    Could you suggest me any name of software that can recover it? Or some trick to force the opening of it? I've tried system's Archive Utility, Stuffit...
    Thanks in advance.
    Ken

    Ken Ponzio wrote:
    Arigato Kenichi.
    But unfortunately I have only mac os sys in my studio! No windows...
    I'already saw there are some windoze zip recover sw but I've not found a mac soft...
    thanks anyway
    ken
    Can you email or FTP it to a Windows user you know? You could also use iDisk or MobilMe to do the same. The Windows user could extract/repair the archive and return it to you.

  • Deleting files that have been extracted from a zip archive

    Can we PLEASE get an update that will allow us to delete the files that were extracted from a zip archive. This is ridiculous. A quick google brings back loads of threads all over the place about people who want to be able to delete files but can't because of some daft bug. 
    How are RIM not aware of this? Do they not care?

    There is a bug in the .zip decompressor used by the native file manager. It incorrectly applies file permissions sometimes stored in the archive to the extracted files, preventing them from being deleted by us mere mortals. Once extracted, there's nothing you can do.
    <plug>
      You could, of course, use Files & Folders to extract your zip files, which doesn't suffer from this problem.
    </plug>
    Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands

  • Loading a text file in a gzip or zip archive using an applet to a String

    How do I load a text file in a gzip or zip archive using an applet to a String, not a byte array? Give me both gzip and zip examples.

    This doesn't work:
              try
                   java.net.URL url = new java.net.URL(getCodeBase() + filename);
                   inputStream = new java.io.BufferedInputStream(url.openStream());
                   if (filename.toLowerCase().endsWith(".txt.gz"))
                        inputStream = (java.io.InputStream)(new java.util.zip.GZIPInputStream(inputStream));
                   else if (filename.toLowerCase().endsWith(".zip"))
                        java.util.zip.ZipInputStream zipInputStream = new java.util.zip.ZipInputStream(inputStream);
                        java.util.zip.ZipEntry zipEntry = zipInputStream.getNextEntry();
                        while (zipEntry != null && (zipEntry.isDirectory() || !zipEntry.getName().toLowerCase().endsWith(".txt")))
                             zipEntry = zipInputStream.getNextEntry();
                        if (zipEntry == null)
                             zipInputStream.close();
                             inputStream.close();
                             return "";
                        inputStream = zipInputStream;
                   else
                   byte bytes[] = new byte[10000000];
                   byte s;
                   int i = 0;
                   while (((s = inputStream.read())) != null)
                        bytes[i++] = s;
                   inputStream.close();
            catch (Exception e)
              }

  • After Migration to Server 2012 R2 One Zip Archive (7.08 mb) Downloads Empty

    I recently migrated from Server 2008 R2 to 2012 R2. I offer a number of web application as zip archives and Dreamweaver Extension installer packages .mxp. I have one zip archive that's empty when downloaded with size 0. Out of all the files served
    the issue only exists with this one file. All the other files regardless of .zip or .mxp work correctly. I think it may be a size related issue. The .zip file that is empty is 7.08 mb and the others are much smaller. I've tried deleting the existing file
    and uploading a new one with and without a file name change and still get same results. Here's the code.
    I'm thinking I may need to allow the larger file download. Does anyone know how to fix this?
    Response.Buffer=true
    On Error Resume Next
    'Create a stream object
    Dim mxp_downloadStream
    Set mxp_downloadStream = Server.CreateObject("ADODB.Stream")
    mxp_downloadStream.Type = 1
    mxp_downloadStream.Open
    mxp_downloadStream.LoadFromFile Server.Mappath("../downloads/dwmx_extensions/" & (rs_mxp.Fields.Item("MXP_DL_Path").Value) & "")
    If Err.number = 0 Then
    Response.Clear
    Response.ContentType = "application/octet-stream"
    Response.AddHeader "Content-Disposition", "attachment; filename=" & (rs_mxp.Fields.Item("MXP_DL_Path").Value) & ""
    Response.AddHeader "Content-Transfer-Encoding","binary"
    Response.BinaryWrite mxp_downloadStream.Read
    mxp_downloadStream.Close
    Set mxp_downloadStream = Nothing
    Response.End()
    End If

    YOu are asking a quesiton about ASP on a web server.  YOu need to post in the web server forum for this.  Thisis not a web scripting forum.
    Try here: http://forums.iis.net/
    ¯\_(ツ)_/¯

  • How to UNZIP broken archive?

    Unrar can extract files from broken archive ("-kb" option, keep broken).
    $ unrar x -kb half-downloaded-file.rar
    How to extract files from broken ZIP?

    JGC, thanks! It works fine!
    tigrmesh wrote:The last time I had a broken ZIP archive, I was able to open it in Windows...
    SpookyET wrote:Oh boy. Install wine. Install WinRAR. The zip files may not be broken, but they may use a newer zip file format that unzip cannot understand.
    What are you talkin' about?

  • Change file in Zip archive without repacking

    Hi All,
    I have Zip archive. It contains ~100000 files. I needed to change only one file, without repacking all Zip archive.
    How can I do this? Do smb have such situations?

    You can't, using Java. I think that there are 3rd-party products that can. Try searching for one.

  • To ZIP all files into a single ZIP archive

    hi,
    Can anybody suggest me how to Zip mutiple files into single Zip archive.

    Hi,
    use Winzip :).Or jar all your files with JAVA. And then rename the
    extension to .zip. In fact a .jar file is a .zip file.
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html
    Cheers!

  • How can I zip a music file?

    hello,
    I am very new with mac, I would like some help in how to compress a music file as well as what type of extention will I need?
    thank you

    Hi,
    Welcome to the Apple Discussions.
    Probably the easiest way would be to select the file in the Finder, then use the "Create Archive of (song file name)" menu item from the "File" menu. It'll compress it and add the file extension automatically.
    So, to compress a file you've selected in iTunes, you'd choose "Show Song File" from the iTunes "File" menu. A window will pop to the front with the song file highlighted. Now you're using the Finder application. Its "File" menu has the "Create Archive of (song file name)". Select that and you should get a zipped archive of your song.
    Be aware, though, that if you are compressing an MP3 or AAC compressed file, it's not likely to get very much smaller, if at all. In general, files that are already compressed don't compress very much more. And the more they're compressed in the first place, the less they'll compress using a second method.
    charlie

  • How can i zip without full path?

    I zip a file with this servlet, but when i unzip the file, it save my file with a full path... how can i do? thanks
    CODE
    import java.io.*;
    import java.util.zip.*;
    public class ZIPFILE
    public String DOPOSTPROCESS(String filename)
    FileOutputStream fileout = null;
    byte[] buf = new byte[1024];
    try
    File f1 = new File(filename);
    File f2 = new File(filename+".zip");
    String fileoutname=filename + ".zip";
    fileout = new FileOutputStream(fileoutname,false);
    ZipOutputStream out = new ZipOutputStream(fileout);
    // Compress the files
    FileInputStream in = new FileInputStream(filename);
    // Add ZIP entry to output stream.
    out.putNextEntry(new ZipEntry(filename));
    // Transfer bytes from the file to the ZIP file
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    // Complete the entry
    out.closeEntry();
    in.close();
    // Complete the ZIP file
    out.close();
    f1.delete();
    f2.renameTo(f1);
    catch (IOException e)
    try
    catch(Exception e1)
    return("Errore CR2CRLF "+e);
    return null;
    }

    If the path name consists of one or several directories and then by the file name, you could use only the file name portion for the insertion into the zip archive.

  • How to read zip file

    How to read zip file

    Zip files are not files you read. They are compressed archives containing other files. There are many utilities available for iOS that will expand zip files into its component files. I believe Documents by Readdle will expand zip files.
    However, if these zip files are attached to a pdf, I am unsure if Documents will do that. Reader and Acrobat will not open zip attachments on Macs and PCs as a security precaution.

  • Check InputStream (File) if it is a ZIP archive?

    How can i check a inputstream (which may be a file but does not have to be) if it is a ZIP stream?

    There should be a way to identify it as a Zip stream
    (probably starts with "PK\0\0"), so...Wow I never knew that... I just checked a .jar file
    and its true.
    BTW, the PK, that's from the original pkzip/unzip,
    right? That's a blast from the pastYes, and "PK" is the late Phil Katz who invented the zip format.
    So if your file (or stream, it makes no difference) starts with those bytes then there is a good chance it is a zip archive. Probably an excellent chance. But you are not guaranteed of that. All the first-couple-of-bytes give you is a sanity check; if they aren't PK etc. then you don't have a zip archive.

  • Salvage from Bad Zip Archive?

    Is there any way to salvage the contents of a bad zip archive? I've got an archive of all of my AppleScripts in an archive that isn't unarchiving. The error message is saying, "Unable to unarchive "AppleScripts.zip" into "Desktop" (Error 2 - No such file or directory.)" Even if I can only recover some of the files, it will be better than nothing.
    iMac G5 20"   Mac OS X (10.4.4)  

    Does zipinfo AppleScripts.zip give any information?
    How about file AppleScripts.zip ?
    unzip -d <directory> AppleScripts.zip will let you unzip to a specified directory, in case the archive is trying to create a directory that it is not allowed to.
    Also, xxd AppleScripts.zip | more will let you look at the binary data - in an archive I have, I see at the top:
    0000000: 504b 0304 1400 0800 0800 6f4e a332 0000 PK........oN.2..
    0000010: 0000 0000 0000 0000 0000 0800 1000 3239 ..............29
    0000020: 3762 2e70 6466 5558 0c00 ab62 c643 e281 7b.pdfUX...b.C..
    and the end of the archive looks like an index to the files in the archive.
    Hope that helps give some clues what is wrong.
    Boyd

Maybe you are looking for