Zip and directory or package

How on earth do I zip a package like an Omnigraffle file? I have a nice folder-action script that zips a file into an archive when it is dropped into the folder, but when I dropped an omnigraffle file into the folder it broke it into all the files that the original omnigraffle file consisted of, in other words it treats the file like a directory and breaks it open. I guess omnigraffle files are packages. If I use ditto it complains and tells me that the file is a directory. I cannot find any zip parameter that allows me to compress an omnigraffle file and keep it is a single compressed file. If I right-click and select compress on a file OS X has no problem and I get a single compressed file with the name and a .zip appended, but if I execute the zip application in terminal, or from my script, I get all the tiffs and jpegs and bits and bobs that the omnigraffle file is built with and the file it a goner.
Most frustrating.
Thanks for any help.
Lawrence

Well - that's done, works fine. The issue I was having was that I wanted files to be zipped into an archive without any path, so I would include the -j parameter. The -j parameter however would not only NOT store the path of the file, but it would also NOT store directory names.
Okay - I thought. There is the -r parameter, this tells zip to travel the directory structure recursively thus picking up sub-directory content. However the -j conflicts with this and what I found was that zip would take the contents of any sub-directory and stick it at the same level as anything outside the folder.
At first I thought this would be okay as I wanted this script to be used for ONLY files. However when I added an Omnigraffle file I was stuck as these are packages, and zip views them as directories. So any omnigraffle file would essentially be burst into its component parts, all rendered as files, at the root level of the archive folder. A total no-no.
If I removed the -j, so that directories would be read and compressed, as well as the omnigraffle files, everything worked fine. Only now each file had a great long file path rooted at /System/user/me..... If I decompressed the zip archive I got a folder named "System" inside which was a folder named "user" and inside that was "me" and on and on until I finally got a folder with my unzipped files in it.
Horrible.
I realized that the key word in "man zip" was that the file path zip uses is relative to where the zip is running, and I was running it as a folder action which defaulted to the root, hence the vast great file path. So all I needed to do was to modify the script so that the zip command references just the file names without path, and then do a cd to the archive directory immediately prior to the zip command itself. Thus I implemented a "do shell script" which had two commands on the same line, separated by a semi-colon, the first command being the cd with the full path to the archive folder and the second being the zip without any paths at all and using just the -r parameter.
Bingo.
Thanks for everyone's help.
Lawrence

Similar Messages

  • Package and Directory Structure

    Hello --
    I work in a group that supports 3 web sites. (b2b, b2c, b2e)
    We're just beginning to develop Java in-house and
    currently using Solaris and JDK 1.2.x.
    I need to propose a package and directory structure strategy.
    The "reverse the domain name" guideline makes sense to me.
    My first thoughts are: ("classes" dir could be created anywhere)
    classes/com/ppco/b2X/ <--- for .java and .class files (development)
    lib/ <--- for b2X JAR files (ready for test or production)
    util/ <--- for our utility classes like DBAccessor
    lib/ <--- for our JAR files
    sun/ <--- for classes like com.sun.mail pkg
    lib/ <--- for JAR files like mail.jar
    org/ <--- for classes in org.omg.CORBA pkg
    lib/ <--- for JAR files
    We need to handle 3rd party classes.
    Development would be done in the b2X tree and JAR files would
    be installed the lib/ dir for testing and release to production.
    Does anyone have recommendations or experiences to share ?
    Are there some things to avoid ?
    Thanks !
    Al

    Hello Al,
    you are on the right track. A typical convention I follow is:
    <project>
          bin - for startup scripts, etc. to run your application
          build - for build scripts (not necessary if you build using your IDE. See below.)
          classes - for my compiled classes
          lib - for my 3rd party libraries
          src - for my source code
          test - for my test code (see http://junit.org/ )
    That's the project hierarchy. The src (i.e. the package heirarchy) structure is another story.
    As you say, you start with the reverse domain name. This is to give your packages a unique namespace. After that, your best guide is practice. Packages can be larger or smaller, depending on your coding practices. Usually you would have these (exact names may differ), plus others:
          com/ppco/client
          com/ppco/server
          com/ppco/common
          com/ppco/db
    I think your break down of sun, org, etc. is a bit too much. If you would like to do so, however, I recommend you do the separation under /lib. This way, the top level project directory is not polluted by the different types of libraries in use.
    Regards,
    Manuel Amago.
    From build above: I would suggest you always build your release distribution directly with the JDK, not using any IDE compiler. This is because Sun's JDK is the reference implementation, thus, any compatibility issues are not yours.
    An easy way to achieve this is by using ANT (see http://jakarta.apache.ort/ant/ ).

  • How to zip a directory and retain tree.

    I would like to zip a directory and retain the subdirectories. Is their any built in (or otherwise easy) way to do this or should I just make a log file of where each file goes.
    Thanks.

    Not built in, but you can still do it. Zipping will be a recursive process, just like
    a directory structure is, and when creating the ZipEntry, be sure to
    set its name to be the path that you want to see in WinZip, for example.
    If you google, I am sure you will find examples.

  • Office 2013 with Visio and Project Error - Package manifest is invalid

    In July I successfully created an App-V install of Office 2013 VL using the ODT. This week I decided to try just doing Visio as we don't install it or Project on all systems. I used my same customconfig.xml and just changed the ProPlusVolume to VisioProVolume
    and changed the source path. Everything downloaded and packaged fine. I was able to import into SCCM just fine and create a deployment to my test collection. However when I run the install out of Software Center I get (as part of a much longer error) the message
    in AppEnforce.log that the package manifest is invalid. Thinking that maybe I had to include Office as long with Visio I tried packaing all three items but still get the same error. Has anyone else seen this behavior and/or ideas how to fix it? Can I sequence
    just Visio or just Project? I'm including my config.xml just in case I've got something wrong with it that I haven't caught. Thanks
     <Configuration>
      <Add SourcePath="<networkpath>\Microsoft\AppVOffice2013\Sept\" OfficeClientEdition="32" >
        <Product ID="ProPlusVolume">
        <Language ID="en-us" />
        </Product>
        <Product ID="VisioProVolume">
        <Language ID="en-us" />
        </Product>
        <Product ID="ProjectProVolume">
        <Language ID="en-us" />
        </Product>
      </Add>
      <Display Level="None" AcceptEULA="TRUE" />
      <Logging Name="OfficeSetup.txt" Path="%temp%" />
      <Property Name="AUTOACTIVATE" Value="1" />
    </Configuration>

    Hy. I'm having the same problema.
    I'm trying to create na app-v package (v.5 SP2) of Office 2013.
    I downloaded the Office Deployment Tool for Click-to-Run from here:
    http://www.microsoft.com/en-us/download/details.aspx?id=36778
    I installed it into C:\Office2013pck shared that folder as 
    \\APPVMANAGER\Office2013 and mapped as Z:\.
    I changed the configuration.xml file to:
    <Configuration>
    <Add OfficeClientEdition="32" >
    <Product ID="ProPlusVolume">
    <Language ID="en-us" />
    </Product>
    <Product ID="VisioProVolume">
    <Language ID="en-us" />
    </Product>
    </Add>
    </Configuration>
    Then I ran in na elevated cmd:
    >Z:
    >\\APPV-CL-WIN7DEF\Office2013\setup.exe /download
    \\APPV-CL-WIN7DEF\Office2013\configuration.xml
    and
    >\\APPV-CL-WIN7DEF\Office2013\setup.exe /packager
    \\APPV-CL-WIN7DEF\Office2013\configuration.xml
    \\APPV-CL-WIN7DEF\Office2013\Appv
    Everything seemed to work fine.
    The creted folder had Office\Data\15.0.4649.1001 folder (I guessed this is a version number)
    When I tried to add the package to App-V Server (in the Console) I get the following error:
    An unexpected error occurred while retrieving AppV package manifest. Windows error code: 1465 - Windows was unable to parse the requested XML data.
    I tryied to publish it from powershell, getting the same error message agalluci image post shows.
    From the Event Log I got this additional information:
    There was a problem retrieving the requested package \\APPVMANAGER\AppVpck\Office\VisioProVolume_ProPlusVolume_en-us_x86.appv for import. Error message: Unspecified error
    Element '{http://schemas.microsoft.com/appv/2010/manifest}UsedKnownFolders' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/2010/manifest}Package'.
    I haven't found any indication of which file is the manifest app-v file.
    I also haven't found any .xml with the "UsedKnownFolders" tag (I changed the .appv package extension to .zip and explored some of the files).
    I tryied creating a package for 32 and 64 bits, only office, office and visio, and office visio and project running Windos 7 and Windows 2012.
    Thanks in advance for any help.

  • How do I create and use a package?

    Sorry for the noobish question, but I have never had the need to use a package and currently would like to learn how they work just to satisfy my own curiosity.
    Suppose I have a file named Node.class in a folder named Classes, and I have another class named Main.class sitting in another folder. I want to create a Node object using the Main class.
    How do I accomplish that? Would I need to use a package?
    I tried to write package Classes; on my Main file but it did not work. thanks

    This is an old explanation I wrote:
    This is a minimal explanation of packages.
    Assume that your programs are part of a package named myapp, which is specified by this first line in each source file:
    package myapp;
    Also assume that directory (C:\java\work\) is listed in the CLASSPATH list of directories.
    Also assume that all your source files reside in this directory structure: C:\java\work\myapp\
    Then a statement to compile your source file named aProgram.java is:
    C:\java\work\>javac myapp\aProgram.java
    And a statement to run the program is:
    java myapp.aProgram
    (This can be issued from any directory, as Java will search for the program, starting the search from the classpath directories.)
    Explanation:
    Compiling
    A class is in a package if there is a package statement at the top of the class.
    The source file needs to be in a subdirectory structure. The subdirectory structure must match the package statement. The top subdirectory must be in the classpath directory.
    So, you generate a directory structure C:\java\work\myapp\ which is the [classpath directory + the package subdirectory structure], and place aProgram.java in it.
    Then from the classpath directory (C:\java\work\) use the command: javac myapp\aProgram.java
    Running
    Compiling creates a file, aProgram.class in the myapp directory.
    (The following is where people tend to get lost.)
    The correct name now, as far as java is concerned, is the combination of package name and class name: myapp.aProgram (note I omit the .class) If you don't use this name, java will complain that it can't find the class.
    To run a class that's NOT part of a package, you use the command: java SomeFile (assuming that SomeFile.class is in a directory that's listed in the classpath)
    To run a class that IS part of a package, you use the command java myapp.aProgram (Note that this is analogous to the command for a class not in a package, you just use the fully qualified name)

  • SQL loader and executing the package

    Hi all,
    I am trying to load the data from flatfile and execute a package from .cmd / .bat file.
    here is the script zip_load.cmd
    sqlldr CONTROL=zip.ctl LOG=zip.log DISCARD=Zip.dsc BAD=Zip.bad userid=scott/tiger@mydb
    sqlplus scott/tiger@mydb
    --sqlplusw scott/tiger@mydb
    EXEC pkg_zip_log.prc_zip_log ('zip_load', NULL, 'address', 'begin', 'begin prc_zip');
    commit;
    EXEC pkg_zip_load.prc_zip_maint;
    pkg_zip_log.prc_zip_log ('zip_load', NULL, 'address', 'end', 'begin prc_zip');
    commit;
    exit;
    The above script stopping after loading the data and logging to database from sqlplus.
    sqlldr CONTROL=zip.ctl LOG=zip.log DISCARD=Zip.dsc BAD=Zip.bad userid=scott/tiger@mydb
    sqlplus scott/tiger@mydb
    It's executing the above 2 statments and stopping at
    SQL prompt SQL>
    Could you guys let me know the fix for executing the all statments in one step.
    Thanks in adv.
    bye

    It happens because SQL+ doesn't know anything about the rows after the connect string. It's just waiting for your input. Here is an example how to make it work.
    I've created test package:
    create or replace package body test
    as
    procedure p1
    as
    begin
    dbms_output.put_line('Hello!');
    end;
    end;
    Then on my Unix machine I created a file test.sh:
    sqlplus scott/tiger@prod << EOF
    set serveroutput on
    exec test.p1
    quit
    EOF
    When I run it from command line:
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Oracle Data Mining option
    JServer Release 9.2.0.1.0 - Production
    SQL> SQL> Hello!
    SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Oracle Data Mining option
    JServer Release 9.2.0.1.0 - Production
    Voila!

  • Compiling and running a package

    Hi
    Iduring making a project i am facing a problem. I have two files under the directory c:\jdk1.3\ghosh\das, named as ghosh.java and das.java
    they are like the folloing:
    ghosh.java
    package.java.das;
    import java.io.*;
    import.java.util.*;
    public class ghosh
    public static void main(String args[])
    das dipak = new das();
    dipak.prn();
    das.java
    package ghosh.das;
    import java.io.*;
    import java.util.*;
    public class das
    das();
    public void prn()
    System.out.println("Package");
    If you please tell me the way to compile and & run this package, I will be highly thankful to you.
    thanx in andvance.
    sudipta

    The statement "package.java.das;" won't compile. Do you mean "package java.das;" or do you mean "package ghosh.das;"? The -d option might not give you the result you want. If you mean, ""package java.das;" and you compile with "-d c:\jdk1.3" then the compiler will create a directory named java in the jdk1.3 directory and create a .class file inside the java directory.
    Depending on the package statement, you execute the ghosh class with "java java.das.ghosh" or "java ghosh.das.ghosh"

  • Zipping  and Unzipping Directories and files both - URGENT PLEASE

    Hi friend,
    I tried for zipping and unzipping but it is not working still.
    and have to submit project tomorrow.
    so please as possible as fast just send me the source code that zip the file/folder and unzip in the same way as it was stored.
    ex : if we zip file c:/temp/myfolder/myfile.ppt to .zip
    unzip should c:/temp/myfolder/myfile.ppt
    thanks
    ghanshyam
    9879152949

    I believe (although I don't want to put words in his mouth) that Madan has run across a similar problem that I am trying to solve.
    For instance if I have the following files:
    c:\pic1.gif
    c:\pic2.gif
    c:\pic3.gifand I zip them in to a file called: pics.zip the will unzip just fine.
    However, if I have them in a directory:
    c:\pics\pic1.gif
    c:\pics\pic2.gif
    c:\pics\pic3.gifA listing of the zip files (all using java of-course) will show the files and dirs correctly:
    \pics\pic1.gif
      \pics\pic2.gif
      \pics\pic3.gifbut will give the following error if you try to un-zip them:
    "The system cannot find the path specified"The ZipEntry class has an 'isDirectory()' method, but it only returns true in the case of an EMPTY directory. If , as in my example, there is an actual file at the end of the entry, it returns false.
    So, at least in my case, I would be looking for advice on how to expand files that reside in directories within the zip file.
    Thank You for any help you can provide

  • When I download a page a message says cannot find zip file directory

    When I try to download a page a message appears after the download time saying in part that "cannot find zip file directory". This message appears on all downloads I attemp.

    Here are typical layouts for the iTunes folders:
    If you have upgraded from version 8 (or earlier) to iTunes 9 (or later) at some point, then your media folder (everything inside the red outline) may still be called iTunes Music instead of iTunes Media. The extra Music folder inside the media folder is used if you have allowed iTunes to Upgrade to iTunes Media Organization (iTunes 9) or used File > Library > Organize Library > Reorganize files in the folder "<Media Folder>" (iTunes 10). Depending on your choices for Keep iTunes Media folder organized and Copy files to iTunes Media folder when adding to library plus a little bug in which one build changed the name of the file storing the choice of layout it is quite easy for some of your files to be organized according to one layout and some the other.
    It is possible that in the upgrade to Lion iTunes has been installed with the current default options while your library is based on an older structure. Use Get Info. on a missing track, click cancel when asked to locate it and look at the path given on the summary tab. Now look for the actual file with Finder. Post both paths back here and we can try to make sense of the problem.
    tt2

  • Starting single sign-on and directory service

    i am trying to install oracle 9i infrastructure on my clean win2000 box with 2.4 GHz proc and 1GB RAM.
    i am getting falilure messages for the following:
    infrastructure instance configuration assistant: failed
    oracle 9i application server randomize password: failed
    single sign on configuration assistant: failed
    infrastructure mod-osso configuration assistant: failed
    OPMN configuration assistant: failed
    log file says:
    Configuration failed for IAS
    IAS Instance creation failed
    Configuration failed for JAZN
    JAZN configuration failed: unable to establish a directory context.
    Configuration succeeded for IASProperty
    Configuration failed for IAS
    Configuration failed for JAZN
    after which single sign-on and directory service dont start. which means no connectivity :(
    can somebody please guide me about how to avoid this failure in installation or how to manually start these after installation.
    it would be a great help
    ashish

    Hi,
    we're having exactly the same problem.
    Could you tell me what the problem is with the network ?
    You say configure it properly but what do you mean ?
    It's installed on a Windows 2000 Server machine, it's own DNS.
    Thanks,
    Yuri Arts

  • File Scenario with Dynamice Filename and Directory

    Hi All,
    we have a requirement that PI has to pickup the file from 2 FTP Server.
    First PI has to pickup an XML file from Server1 , this XML file has a details about the Filename and Directory of the second FTP server., then PI should login to the server2 and pickup the file form the directory.
    Regards,
    Mani

    Hi Mani,
    Can you try below approach ,
    Read file 1 from Server 1 using sender file Communication channel and read 2nd filename and directory details and pass these values to UDF/Java mapping to log in to server 2 and retrieve the data/file2 ?
    Thanks
    Hari.

  • Dynamic File Name and Directory File Sender Adapter

    Hello gurus,
    I have a question: Is there any way to make the File Name, and Directory Dynamic of a File Sender Communication Channel ?
    For example, taking it as a parameter from a Web Service Request.. (I mean, the only way with this would be a ccBPM). I don't exactly know if there is a way, I just thought about this.
    Please tell me if someone could make Dynamic these 2 parameters while picking a file.
    Regards,
      Juan

    oops,thought i was replying to the PgP question:)
    I think you should be able to achieve this via adapter module but i m not really sure how exactly it will be done .
    Thanks
    Aamir
    Edited by: Aamir Suhail on Jul 28, 2009 1:42 PM

  • Java Message Mapping : Dynamic FileName and Directory for ASMA

    How to Put Dynamic FileName and Directory for ASMA Properties of File Receiver adapter in Java Message Mapping ???
    I know How to Do this in UDF , But In Java Type Message Mapping . How to do this ????
    Regards
    PS.

    Hi
    chk this:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=95093307
    Thanks
    Amit

  • File and directory names with Danish characters

    I have installed the Novell Client v2.0 for Linux on my Open Suse 10.3. The Client is connecting to my Netware servers (6.0 & 6.5) without any problems...
    There is one problem... Filenames and directory names with the Danish , & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as b. and when clicking the file the file disappears from the file list. It seems to be the same problem with the German (umlaub).
    What to do?
    /Michael

    Originally Posted by J.H.M. Dassen (Ray)
    mimo <[email protected]> wrote:
    > There is one problem... Filenames and directory names with the Danish ,
    > & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as
    > b. and when clicking the file the file disappears from the file list. It
    > seems to be the same problem with the German (umlaub). What to do?
    As far as I know, the Novell Client for Linux expects that file and
    directory names use the UTF-8 encoding and does not support a traditional
    8-bit encoding like ISO 8859-1. Try changing the encoding of file and
    directory names to UTF-8 as described in
    SDB:Converting Files or File Names to UTF-8 Encoding - openSUSE
    HTH,
    Ray Dassen
    Technical Support Engineer, EMEA Services Center, Novell Technical Services
    Novell, Inc. Software for the Open Enterprise Software for the Open Enterprise
    Seems a good hint. When I create a folder or file from within SUSE using an "Umlaut" everything is OK and NCL 2.0 displays them correctly as they are UTF-8 formatted.
    The proposed tool is no solution: one cannot convert folders or files that one cannot see (does it work for folders at all?). Maybe a windows tool would work because one could search for all files or folders with "Umlaute" and convert them. Other options?

  • How to install SWC and load the package in CS3

    hello,
    does anyone know how to install a swc and load the package?
    I have installed the two SWC as3corelib-.92.1 and
    xmlsyndication.swc into components, but when I call the package
    from an AS file nothing happens other than, 1172: Definition
    com.adobe:xml could not be found.
    They turn up ok in flash as components, but I think I miss
    something..
    anyone knows how to make these to work in flash so I can make
    this:
    http://www.ploem.be/blog/?page_id=105
    hints, advice anything most appreciated.!
    //Peter

    right :) an instance of a component needs to be either
    dragged to the stage, or in some cases into the file Library,
    before they become available in your file. is it working
    now?

Maybe you are looking for

  • Can't write on SD card even first party apps

    Since I updated my Xperia Z to the 4.4.4 kitkat using pc companion, I couldn't copy any file to SD card Searching on Google I knew their is a restrictions for third party apps but even my first party apps can't write on my SD card (32 gb). Camera app

  • Acrobat 11 upgrade on new laptop

    I have installed Acrobat 11 on my new laptop. Will not run as products to upgrade from not installed on the new laptop

  • Locking issue SAP CRM 4.0 and SAP R/3 ECC 5.0

    Hi all, I have a problem that I would like to share before creating any OSS message. I have connected our CRM 4.0 environment to our new SAP R/3 ECC 5.0 environment and am faced with a strange problem. All middleware settings seem to be correct, busi

  • Indesign Center Dashed line

    Hello Sometimes I saw Dashed line in center of Indesign artboard. Generally in multipage documents. When They make pdf it automatically disappeard. How can ı put that center line.

  • "Replace with after effects composition" on Premiere gives me a empty AE project...

    I'm selecting and right clicking footage from my Premiere timeline, clicking "Replace with after effects composition", and getting a black, empty screen on After Effects.. There is no footage under Project in AE, and the footage I selected on Premier