Using applescript to unzip a file

I have a zip file in the same folder as a applescript application. I just want to unzip it into the same folder and then delete the zip file but have no skills with applescript (this is actually for a Filemaker project) This is what I have so far. Any help would be gratefully appreciated!!
tell application "Finder"
set path_2 to quoted form of POSIX path of (folder of (path to me) as alias)
end tell
tell application "System Events"
do shell script "unzip -u\"/path_2/*.zip \" -d /path_2"
end tell

You're pretty close. What you're missing is the right way to combine static text with variables when you construct your shell command:
tell application "Finder"
set path_2 to quoted form of POSIX path of (folder of (path to me) as alias)
end tell
do shell script "unzip -u " & path_2 & "nameof.zip & " -d " & path_2
Note the use of & to concatenate static strings (such as "unzip -u ") along with variables (such as path_2). Just make sure you get the spaces in the right place.

Similar Messages

  • How can I use Applescript to copy a file's icon to the clipboard?

    Hello,
    How can I use Applescript to copy a file's icon to the clipboard?
    Thanks.
    Lennox

    there is no way to do that that I know of. but you can extract an icon of a file to another file using command line tool [osxutils|http://sourceforge.net/projects/osxutils]. you can then call the relevant command from apple script using "do shell script".

  • Problem using payloadZipBean to unzip a file

    I would like to run OS command to zip large amount of xml into one zip file before XI pick it up, then use unzip option in payloadZipBean to unzip all the xml files so XI can process them one by one from memory, this will reduce lots file I/O time.
    But I am getting this warning message:
    Warning Zip: message is empty or has no payload
    But if I display this message in RWB, the only payload is this zip file.
    Why the payloadZipBean is not unzipping this file as supposed to.

    Did you check this blog
    /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework
    Sameer

  • Using AppleScript/Automator to get file path and create AFP hyperlink

    Hi All,
    A colleague has asked for a service (contextual menu item in Finder) to get a selected item's remote (afp://) file path and copy it to the clipboard...  Pretty sure I've got that part down. 
    What I need advice on is how to make the resulting pasted file path into a serviceable hyperlink.  AFP keeps telling me there was an error connection to the server....  Does the copied path have to include mounting commands and user credentials for this to work??
    Thanks,
    Nathan

    Hi Richard - here's the script:
    tell application "Finder"
              set sel to the selection as text
              set TempTID to AppleScript's text item delimiters
              set AppleScript's text item delimiters to space
              set sel to text items of sel
              set AppleScript's text item delimiters to "%20"
              set sel to sel as string
              set AppleScript's text item delimiters to TempTID
    set the clipboard to "file://" & POSIX path of sel
    end tell

  • Using Applescript to identify a file with no extension?

    Sometimes clients submit a file that has no extension and just shows up as a "document" is there any way to probe into it and get it's file type or creator or anything?
    Getting the properties of it returns these...
    file type: missing
    Kind: document

    if it is only a file here and there best is to use the command "file" on the CLI (Terminal)
    Usage: file filename
    file give you the filetype by matching the "magic number" in the fileheader
    For more info use "man file" on Terminal

  • Cannot use winzip to unzip the zip file zipped by java.util.zip

    Hi all,
    I use the followcode to create a zip file, and i downlaod it and try to use winzip to unzip this file but fail. The path is correct and i got the zip file. but it just cannot unzip.
    pls help
    thanks alot.
    Kin
              int count = 0;
              count = ContentDocuments.size();
              for (int i = 0; i < bb; i++)     {
                   System.out.println(filenames[i] + "");
              // Create a buffer for reading the files
              byte[] buf = new byte[10*1024*1024];
              try {      
                   String outFilename = MyDir + "zipfile/" + getContentID2()+".zip";
                   System.out.println("outFilename = " + outFilename);
                   ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
                   for (int i=0; i<filenames.length; i++) {           
                        FileInputStream in = new FileInputStream(filenames);
                        out.putNextEntry(new ZipEntry(filenames[i]));
                        int len;
                        while ((len = in.read(buf)) != -1) {               
                             out.write(buf, 0, len);
                        out.closeEntry();
                        in.close();
                   out.close();
              } catch (IOException e)     {
                   System.err.println("zipprocess " + e.getMessage());

    I've written a replacement zip file creator class. Not much tested but it seems to work, however I've yet to try it with the version of WINZIP that rejected my previous attempts. Oh, and the stored dates are garbage.
    * ZipOutputFile.java
    * Created on 25 March 2004, 13:08
    package zip;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    * <p>Creates a ZIP archive in a file which WINZIP should be able to read.</p>
    * <p>Unfortunately zip archives generated by the standard Java class
    * {@link java.util.zip.ZipOutputStream}, while adhering to PKZIPs format specification,
    * don't appear to be readable by some versions of WinZip and similar utilities. This is
    * probably because they use
    * a format specified for writing to a non-seakable stream, where the length and CRC of
    * a file is writen to a special block following the data. Since the length of the binary
    * date is unknown this makes an archive quite complicated to read, and it looks like
    * WinZip hasn't bothered.</p>
    * <p>All data is Deflated. Close completes the archive, flush terminates the current entry.</p>
    * @see java.util.zip.ZipOutputStream
    * @author  Malcolm McMahon
    public class ZipOutputFile extends java.io.OutputStream {
        byte[] oneByte = new byte[1];
        java.io.RandomAccessFile archive;
        public final static short DEFLATE_METHOD = 8;
        public final static short VERSION_CODE = 20;
        public final static short MIN_VERSION = 10;
        public final static int  ENTRY_HEADER_MAGIC = 0x04034b50;
        public final static int  CATALOG_HEADER_MAGIC = 0x02014b50;
        public final static int  CATALOG_END_MAGIC = 0x06054b50;
        private final static short DISC_NUMBER = 0;
        ByteBuffer entryHeader = ByteBuffer.wrap(new byte[30]);
        ByteBuffer entryLater = ByteBuffer.wrap(new byte[12]);
        java.util.zip.CRC32 crcAcc = new java.util.zip.CRC32();
        java.util.zip.Deflater def = new java.util.zip.Deflater(java.util.zip.Deflater.DEFLATED, true);
        int totalCompressed;
        long MSEPOCH;
        byte [] deflateBuf = new byte[2048];
        public static final long SECONDS_TO_DAYS = 60 * 60 * 24;
         * Entry stores info about each file stored
        private class Entry {
            long offset;        // position of header in file
            byte[] name;
            long crc;
            int compressedSize;
            int uncompressedSize;
            java.util.Date date;
             * Contructor also writes initial header.
             * @param fileName Name under which data is stored.
             * @param date  Date to label the file with
             * @TODO get the date stored properly
            public Entry(String fileName, java.util.Date date) throws IOException {
                name = fileName.getBytes();
                this.date = date == null ? new java.util.Date() : date;
                entryHeader.position(10);
                putDate(entryHeader);
                entryHeader.putShort(26, (short)name.length);
                offset = archive.getFilePointer();
                archive.write(entryHeader.array());
                archive.write(name);
                catalog.add(this);
                crcAcc.reset();
                totalCompressed = 0;
                def.reset();
             * Finish writing entry data. Save the lenghts & crc for catalog
             * and go back and fill them in in the entry header.
            public void close() throws IOException {
                def.finish();
                while(!def.finished())
                    deflate();
                entryLater.position(0);
                crc = crcAcc.getValue();
                compressedSize = totalCompressed;
                uncompressedSize = def.getTotalIn();
                entryLater.putInt((int)crc);
                entryLater.putInt(compressedSize);
                entryLater.putInt(uncompressedSize);
                long eof = archive.getFilePointer();
                archive.seek(offset + 14);
                archive.write(entryLater.array());
                archive.seek(eof);
             * Write the catalog data relevant to this entry. Buffer is
             * preloaded with fixed data.
             * @param buf Buffer to organise fixed lenght part of header
            public void writeCatalog(ByteBuffer buf) throws IOException {
                buf.position(12);
                putDate(buf);
                buf.putInt((int)crc);
                buf.putInt(compressedSize);
                buf.putInt(uncompressedSize);
                buf.putShort((short)name.length);
                buf.putShort((short)0);  // extra field length
                buf.putShort((short)0);  // file comment length
                buf.putShort(DISC_NUMBER);  // disk number
                buf.putShort((short)0); // internal attributes
                buf.putInt(0);      // external file attributes
                buf.putInt((int)offset); // file position
                archive.write(buf.array());
                archive.write(name);
             * This writes the entries date in MSDOS format.
             * @param buf Where to write it
             * @TODO Get this generating sane dates
            public void putDate(ByteBuffer buf) {
                long msTime = (date.getTime() - MSEPOCH) / 1000;
                buf.putShort((short)(msTime % SECONDS_TO_DAYS));
                buf.putShort((short)(msTime / SECONDS_TO_DAYS));
        private Entry entryInProgress = null; // entry currently being written
        private java.util.ArrayList catalog = new java.util.ArrayList(12);  // all entries
         * Start a new output file.
         * @param name The name to store as
         * @param date Date - null indicates current time
        public java.io.OutputStream openEntry(String name, java.util.Date date) throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            entryInProgress = new Entry(name, date);
            return this;
         * Creates a new instance of ZipOutputFile
         * @param fd The file to write to
        public ZipOutputFile(java.io.File fd) throws IOException {
            this(new java.io.RandomAccessFile(fd, "rw"));
         * Create new instance of ZipOutputFile from RandomAccessFile
         * @param archive RandomAccessFile
        public ZipOutputFile(java.io.RandomAccessFile archive) {
            this.archive = archive;
            entryHeader.order(java.nio.ByteOrder.LITTLE_ENDIAN);  // create fixed fields of header
            entryLater.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            entryHeader.putInt(ENTRY_HEADER_MAGIC);
            entryHeader.putShort(MIN_VERSION);
            entryHeader.putShort((short)0);  // general purpose flag
            entryHeader.putShort(DEFLATE_METHOD);
            java.util.Calendar cal = java.util.Calendar.getInstance();
            cal.clear();
            cal.set(java.util.Calendar.YEAR, 1950);
            cal.set(java.util.Calendar.DAY_OF_MONTH, 1);
    //        def.setStrategy(Deflater.HUFFMAN_ONLY);
            MSEPOCH = cal.getTimeInMillis();
         * Writes the master catalogue and postamble and closes the archive file.
        public void close() throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            ByteBuffer catEntry = ByteBuffer.wrap(new byte[46]);
            catEntry.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            catEntry.putInt(CATALOG_HEADER_MAGIC);
            catEntry.putShort(VERSION_CODE);
            catEntry.putShort(MIN_VERSION);
            catEntry.putShort((short)0);
            catEntry.putShort(DEFLATE_METHOD);
            long catStart = archive.getFilePointer();
            for(java.util.Iterator it = catalog.iterator(); it.hasNext();) {
                ((Entry)it.next()).writeCatalog(catEntry);
            catEntry.position(0);
            catEntry.putInt(CATALOG_END_MAGIC);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort((short)catalog.size());
            catEntry.putShort((short)catalog.size());
            catEntry.putInt((int)(archive.getFilePointer() - catStart));
            catEntry.putInt((int)catStart);
            catEntry.putShort((short)0);
            archive.write(catEntry.array(), 0, catEntry.position());
            archive.setLength(archive.getFilePointer());  // truncate if old file
            archive.close();
            def.end();
         * Closes entry in progress.
        public void flush() throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            entryInProgress.close();
            entryInProgress = null;
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(byte[] b) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b);
            def.setInput(b);
            while(!def.needsInput())
                deflate();
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(int b) throws IOException{
            oneByte[0] = (byte)b;
            crcAcc.update(b);
            write(oneByte, 0, 1);
         *  Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
         * @param off Start offset
         * @param len Byte count
        public void write(byte[] b, int off, int len) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b, off, len);
            def.setInput(b, off, len);
            while(!def.needsInput())
                deflate();
        * Gets a buffer full of coded data from the deflater and writes it to archive.
        private void deflate() throws IOException {
            int len = def.deflate(deflateBuf);
            totalCompressed += len;
            if(len > 0)
                archive.write(deflateBuf, 0, len);

  • Using AppleScript to find specific text in mail message?

    I'm new to scripting, and I'm a bit lost on this one...
    Is there any way to use AppleScript to find a file name from within the body of a mail message so it can be used later in the script?
    Specifically, I want to use AppleScript to "read" the content of a mail message and look for a paragraph that says "Filename: MyFileName" so I can set "MyFileName" as a variable. (There will always be a paragraph that begins with "Filename: " in this particular email message.)
    This will part of a larger script that uses Fetch to download "MyFileName" from our FTP server.
    Thanks in advance for any ideas - I'm struggling with this one.
    Andy Gill

    Ok, red_menace above me had a shorter and more elegant solution to the question, I'm adding this just for another example.
    To solve your problem I'd make a mail rule that looked for any messages with "Filename:" in them (along with whatever criteria you wanted, like sender, domain, etc). The mail rule would execute the Applescript. My assumption is that the "Filename:foobar" text could be anywhere in the email, not necessarily the first thing in a paragraph, so I had to parse it differently.
    The results end up in a datalist, (theFilename {} ) that you can parse later to collect all filenames found in whatever messages were processed.
    I realize this could be cleaner, hope it's not hard to follow, but I did it really fast. It works flawlessly for me, picking out the name of the file no matter where in the email it appears.
    using terms from application "Mail"
    on perform mail action with messages theSelectedMessages for rule theRule
    repeat with aCounter from 1 to count theSelectedMessages
    set theMessage to item aCounter of theSelectedMessages
    set theContent to content of theMessage
    set theWords to every word of theContent
    set theFilename to {}
    set tid to AppleScript's text item delimiters
    set AppleScript's text item delimiters to ":"
    repeat with thisLoop in theWords
    try
    if (text item 1 of thisLoop) is "Filename" then
    set end of theFilename to (text item 2 of thisLoop)
    -- rest of your logic goes here the display is just to show it finds the filename, take it out!
    display dialog theFilename ¬
    buttons {"OK"}
    end if
    end try
    end repeat
    set AppleScript's text item delimiters to tid
    end repeat
    end perform mail action with messages
    end using terms from
    Message was edited by: stephen.bradley Typos for the win!

  • New to applescript. need to create a plist file using applescript

    Needed some help I need on creatinga plist file below using applescript and I can't make it happen needed some hand on this.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Username</key>
    <string>${localAdminUser}</string>
    <key>Password</key>
    <string>${localAdminPassword}</string>
    <key>AdditionalUsers</key>
    <array>
    <dict>
    <key>Username</key>
    <string>${userName}</string>
    <key>Password</key>
    <string>${userPassword}</string>
    </dict>
    </array>
    </dict>
    </plist>
    I have tis code but it doesn't seems to work.
    tell application "System Events"
      -- create an empty property list dictionary item
              set the parent_dictionary to make new property list item with properties {kind:record}
      -- create new property list file using the empty dictionary list item as contents
              set the plistfile_path to "~/Desktop/example.plist"
              set this_plistfile to ¬
      make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
      -- add new property list items of each of the supported types
      make new property list item at end of property list items of contents of this_plistfile ¬
                        with properties {kind:string, name:"Username", value:"${localAdminUser}"}
      make new property list item at end of property list items of contents of this_plistfile ¬
                        with properties {kind:string, name:"Password", value:"${localAdminPassword}"}
      make new property list item at end of property list items of contents of this_plistfile ¬
                        with properties {kind:list, name:"AdditionalUsers"}
      make new property list item at end of property list items of contents of this_plistfile ¬
                        with properties {kind:string, name:"Username", value:"${localAdminUser}"}
      make new property list item at end of property list items of contents of this_plistfile ¬
                        with properties {kind:string, name:"Password", value:"${localAdminPassword}"}
    end tell
    The result of the above code will generate a plist file below
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>AdditionalUsers</key>
              <array/>
              <key>Password</key>
              <string>${localAdminPassword}</string>
              <key>Username</key>
              <string>${localAdminUser}</string>
    </dict>
    </plist>

    Hello
    You need to create elements at correct container. Like this.
    set plist_file to (path to desktop)'s POSIX path & "example.plist"
    --set plist_file to "~/desktop/example.plist"
    tell application "System Events"
        tell (make new property list file with properties {name:plist_file})
            make new property list item at end with properties {kind:string, name:"Username", value:"${localAdminUser}"}
            make new property list item at end with properties {kind:string, name:"Password", value:"${localAdminPassword}"}
            tell (make new property list item at end with properties {kind:list, name:"AdditionalUsers"})
                tell (make new property list item at end with properties {kind:record})
                    make new property list item at end with properties {kind:string, name:"Username", value:"${localAdminUser}"}
                    make new property list item at end with properties {kind:string, name:"Password", value:"${localAdminPassword}"}
                end tell
            end tell
        end tell
    end tell
    Or you may create a record in AppleScript and set the value of plist file at once. Like this.
    set plist_file to (path to desktop)'s POSIX path & "example.plist"
    --set plist_file to "~/desktop/example.plist"
    set dict to ¬
        {|Username|:"${localAdminUser}", |Password|:"${localAdminPassword}"} & ¬
        {|AdditionalUsers|:{¬
            {|Username|:"${localAdminUser}", |Password|:"${localAdminPassword}"} ¬
    --set dict to {|Username|:"${localAdminUser}", |Password|:"${localAdminPassword}", |AdditionalUsers|:{{|Username|:"${localAdminUser}", |Password|:"${localAdminPassword}"}}}
    tell application "System Events"
        tell (make new property list file with properties {name:plist_file})
            set value to dict
        end tell
    end tell
    Regards,
    H
    Message was edited by: Hiroto (PS. Fixed second script so that it uses the original case (uppercase)  in key string)

  • Unzip GZ files using Powershell

    I have  Windows 2008 Server with some GZ type files in a folder. I would like to script unzipping them using Powershell, can someone tell me if this is possible and how I would do it?
    The folder is d:\data_files\ and I'd like to uncompress all the .gz files in there
    I've searched around on the Net but can't find much that deals with GZ files specifically. The files are all named data-1.gz, data-2.gz etc
    Hello
    I have  Windows 2008 Server with some GZ type files in a folder. I would like to script unzipping them using Powershell, can someone tell me if this is possible and how I would do it?
    The folder is d:\data_files\ and I'd like to uncompress all the .gz files in there
    I've searched around on the Net but can't find much that deals with GZ files specifically.

    I also found that .Net 2.0 and above has native code for dealing with gzip files.
    Function DeGZip-File{
    Param(
    $infile,
    $outfile = ($infile -replace '\.gz$','')
    $input = New-Object System.IO.FileStream $inFile, ([IO.FileMode]::Open), ([IO.FileAccess]::Read), ([IO.FileShare]::Read)
    $output = New-Object System.IO.FileStream $outFile, ([IO.FileMode]::Create), ([IO.FileAccess]::Write), ([IO.FileShare]::None)
    $gzipStream = New-Object System.IO.Compression.GzipStream $input, ([IO.Compression.CompressionMode]::Decompress)
    $buffer = New-Object byte[](1024)
    while($true){
    $read = $gzipstream.Read($buffer, 0, 1024)
    if ($read -le 0){break}
    $output.Write($buffer, 0, $read)
    $gzipStream.Close()
    $output.Close()
    $input.Close()
    $infile='C:\Temp\DECfpc1new.csv.gz'
    $outfile='c:\temp\DECfpc1new.csv'
    DeGZip-File $infile $outfile
    You can supply the function with the full path of the file to be unzipped, and the full path of the unzipped file.
    If you don't supply the unzipped file path, the function will unzip the file into the same folder as the source, and remove the .gz extension.
    Inspired by Heineken.

  • How to check & unzip zip file using java

    Dear friends
    How to check & unzip zip file using java, I have some files which are pkzip or some other zip I want to find out the type of ZIp & then I want to unzip these files, pls guide me
    thanks

    How to check & unzip zip file using java, I have
    ve some files which are pkzip or some other zip I
    want to find out the type of ZIp & then I want to
    unzip these files, pls guide meWhat do you mean "other zip"? Either they're zip archives or not, there are no different types.

  • How to append paragraph in text file of TextEdit application using applescript

    how to append paragraph in text file of TextEdit application using applescript and how do i save as different location.

    christian erlinger wrote:
    When you want to print out an escape character in java (java is doing the work in client_text_io ), you'd need to escape it.
    client_text_io.put_line(out_file, replace('your_path', '\','\\'));cheersI tried replacing \ with double slash but it just printed double slash in the bat file. again the path was broken into two lines.
    file output
    chdir C:\\DOCUME~1\
    195969\\LOCALS~1\\Temp\
    Edited by: rivas on Mar 21, 2011 6:03 AM

  • Zip Exception Problem using jeode to unzip file

    Hi,
    I am using a JAva application, that has a client running on the IPAQ-Jeode JVM and the server is on JDK 1.3.
    The application is using RMI to communicate between the Server and the PDA. The application code is running on JDK 1.3. Once the RMI communication is established, the server (during deployment) creates a ZIP file The zip file is serialized to the client machine (in this case, the Ipaq). The Client code later, running on Jeode, tries to unzip this file and extract the files.
    We observed that the files created by the server (on JDK 1.3) cannot be unzipped by the Jeode JVM and gives an Zip Exception. The same zip file can be successfully uncompressed by machines having Sun's J2SE versions JDK 1.3 and JDK 1.1.8(which is compatible with PJava).
    The exception which I receive is
    2002-02-28 12:05:37,194 [Thread-0] INFO com.op40.utl.LogStream - java.util.zip.ZipException
    2002-02-28 12:05:37,213 [Thread-0] INFO com.op40.utl.LogStream -      at java.util.zip.ZipInputStream.read (bytecode 305)
    2002-02-28 12:05:37,234 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.java.util.InputStreamToOutputStream.copy (bytecode 54)
    2002-02-28 12:05:37,879 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.java.util.FileToStream.copy (bytecode 71)
    2002-02-28 12:05:37,895 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asset.FleAad.setPayload (bytecode 124)
    2002-02-28 12:05:37,913 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.immediateDeploy (bytecode 141)
    2002-02-28 12:05:38,000 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.immediateDeploy (bytecode 28)
    2002-02-28 12:05:38,020 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.scheduleDeployment (bytecode 91)
    2002-02-28 12:05:38,037 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.deployAssets (bytecode 17)
    2002-02-28 12:05:38,632 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.client.CdaImpl.processAssets (bytecode 33)
    2002-02-28 12:05:38,652 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asttpt.PtpAstRcv.processAssets (bytecode 82)
    2002-02-28 12:05:38,669 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asttpt.PtpAstRcv.access$900 (bytecode 3)

    Is your client running as an applet or application? I have a client applet that tries to connect to my RMI server, but I keep getting the following exception even though java.rmi.registry.LocateRegistry is in the /Windows/lib/core.jar.
    java.lang.NoClassDefFoundError: java/rmi/registry/LocateRegistry
    at java.rmi.Naming.getRegistry (bytecode 12)
    at java.rmi.Naming.list (bytecode 6)
    Test.init (bytecode 6)
    com.insignia.applet.AppletPanel.run (AppletPanel.java, line 0)
    java.lang.Thread.run (bytecode 11)If you have any suggestions, that'd be great. You can contact me at [email protected]
    Thanks,
    Eric

  • Want To create Zip file  using java,And Unzip without Java Program

    I want to create a zip text file using java, I know Using ZipOutputStream , we can create a zip file, , But i want to open that zip file without java program. suppose i use ZipOutputStream , then zip file is created But for unZip also difftrent program require. We cant open that zip file without writing diff java program.
    Actually i have one text file of big size want to create zip file using java , and unzip simply without java program.Its Possible??
    Here is one answer But I want to open that file normal way(
    For Exp. using winzip we can create a zip file and also open simply)
    http://forum.java.sun.com/thread.jspa?threadID=5182691&tstart=0

    Thanks for your Reply,
    I m creating a zip file using this program, Zip file Created successfully But when im trying to open .zip file i m getting error like "Canot open a zip file, it does not appear to be valid Archive"
    import java.io.*;
    import java.util.zip.*;
    public class ZipFileCreation
         public static void main (String argv[])
         try {
         FileOutputStream fos = new FileOutputStream ( "c:/a.zip" );
         ZipOutputStream zip = new ZipOutputStream ( fos );
         zip.setLevel( 9 );
         zip.setMethod( ZipOutputStream.DEFLATED );
    //     get the element file we are going to add, using slashes in name.
         String elementName = "c:/kalpesh/GetSigRoleInfo092702828.txt";
         File elementFile = new File ( elementName );
    //     create the entry
         ZipEntry entry = new ZipEntry( elementName );
         entry.setTime( elementFile.lastModified() );
    //     read contents of file we are going to put in the zip
         int fileLength = (int)elementFile.length();
         System.out.println("fileLength = " +fileLength);
         FileInputStream fis = new FileInputStream ( elementFile );
         byte[] wholeFile = new byte [fileLength];
         int bytesRead = fis.read( wholeFile , 0 /* offset */ , fileLength );
    //     checking bytesRead not shown.
         fis.close();
    //     no need to setCRC, or setSize as they are computed automatically.
         zip.putNextEntry( entry );
    //     write the contents into the zip element
         zip.write( wholeFile , 0, fileLength );
         zip.closeEntry(); System.out.println("Completed");
    //     close the entire zip
         catch(Exception e) {
    e.printStackTrace();
    }

  • Use applescript w/automator to change files permissions

    Hi, I need to change permission to several files to Read and Write to the Owner, Staff and everyone. I do this everyday, that's why I need someway to automate this action. I don't know about scripting but I do know (more or less) how to create a service in Automator. I am looking to create a service in automator which runs an applescript that changes this file's permissions. I need this to be applied to all sub folders and subfiles. Any clue what the applescript should say? Thnx

    Perfect! It worked perfectly even though I didn't understood the difference between the first shell script and the other. I've tried both, and they both did the same thing: They changed the Owner, the Staff and Everyone to Read and write.
    For my tests, this is what I did (for the sake of all the non geeky guys like me who needs this):
    I opened Automator and choose to make a Service, and set it to Files and Folders in Finder.
    Then I added the finder action "Get selected finder items".
    Then added "Run shell script" and did what you told me, and that's it!
    Thanx for your time

  • Using applescript to get iCal to open a file

    I'm trying to use AppleScript to get iCal to open a Word doc at a specified date/time.
    As a complete novice to AppleScript, I'm sure I have misunderstood how the syntax and grammar of the language work. Would you please advise me how to change this script --
    set filepath to POSIX path of "Microsoft Word:Users:mtmanner:Documents:Family JY & Friends:Craig:Craigs Goals:Socializing:Being with people.doc"
    try
              set command to "open Users/mtmanner/Documents/Family JY & Friends:Craig/Craigs Goals/Socializing/Being with people.doc"
    do shell script command
    end try
    Thanks for your help.

    There is a useful book called 'AppleScript for Dummies'. Don't be put of by the irritating title: it's actually quite sensibly written and informative (just ignore the occasional facetiousness designed not to frighten nervous readers off). When I was looking for a manual the other books available were much more expensive; I've found this one covers most requirements.
    We had three weeks of heatwave: not it's gone unsettled again with rain (which we needed) and temperatures up and down loke the proverbial yo-yo - typical British summer, in other words.

Maybe you are looking for

  • Toshiba bios update

    Ok so I just finally ran the recommended updates toshiba has been bugging me about at startup for the longest time and ran into an issue. Turns out there was a bios update hidden in there and I'm not sure that it finished properly. It ran the update

  • ICal availability panel message "This Calendar does not support availability". Synch is OK with CalDAV. Don't know why - only since installing Yosemite

    My iCal is synching OK withe the CalDAV calendar it is linked to, but when I try and check availability of others to schedule an appointment, it says "This Calendar does not support availability" I've only started getting this since upgrading to Yose

  • Folio Builder-Indesign CS6 stopped working

    Hey to everybody!! Every time that i want to open Folio Builder it keeps appearing the same thing. Adobe Indesign CS6 stopped working. I don't know why. I tried to reinstall digital publishing suite in case if some of the archives were damaged but i

  • Loading Hierarchy data from a DSO!

    Hi SDN, We have a ZTable containing a custom hierarchy in the SAP ECC system and we bring all its data into a staging DSO in BI via PSA. So now we have the hierarchy data in two places: PSA and a write-optimized staging DSO. Any idea how can we load

  • Apple TV "Could not connect to [my apple ID's]Library

    Hi Since Yosemite I can no longer connect to my apple ID's library for pictures for the Apple TV screen saver (iTunes on, home sharing on, Apple TV and iTunes updated to the latest version, same network, etc.). Solutions? Thanks!