Automator: Extract multiple zip files

I'm trying to create an Automator service for the Finder in Lion.
It gives me an "error in shell script".
What am I doing wrong?
I just created a similar script that uses "imguru" to upload images to imgurl.com which works great, so i'm thinking that it's must be the line with "unzip" that creates a problem.
Any help is appreciated

#!/usr/bin/  IS NOT a valid 1st line in ANY shell scirpt
You either want nothing there, or you want
#!/usr/bin/env bash
-OR-
#!/bin/bash
-OR-
Some other path to a valid shell interpreter.

Similar Messages

  • Extract a zip file

    I have a program that includes a set of around 50 photos.  I have zipped those files and included them in my build.  Now I'd like to extract those photos to a folder during the installation process.  I've reviewed the application builder, but can find no reference to extracting a zip file.
    What am I overlooking?  I'd appreciate any help.  Thanks.

    You can create another executable that can decompress the file. Then, in Application builder, in the "Installer Settings" tab, there is a button that reads "Advanced...". A dialog will open with an option called "Run executable after installation". You can call your decompression executable from there.
    Another option is to check OpenG Builder, which is also an application to deploy LabVIEW software. The zip functions are included, and because is open source, you can modify it so the installer shows the behavior you want.
    Regards;
    Enrique
    www.vartortech.com

  • FSCM MP9 - unable to extract the zip file EODS_QUERY_FIX

    Hi,
    I am applying FSCM 9.1 Maintenance Pack 9 on Finance application.
    During on estep I need to apply the project, which can be found on EODS_QUERY_FIX.ZIP
    "Please locate EODS_QUERY_FIX.zip in upd878541\upd878541_install and manually apply the project to your Database."
    I am unable to extract the zip file.
    It's high appreciated if some one can help me in extracting or identifying the project.
    Thank You!
    Best Regards
    Soundappan

    Hi,
    I had the same exact issue yesterday. From my install workstation I was unable to open the zip file but from another PC I could open it with no errors, so I've copied the archive I could open from my PC to my install workstation and still I could not open it.. very strange.
    The difference between my PC and the install workstation was that on my PC I'm using 7zip and on the install workstation I'm using WinZip.
    So I've extracted the zip file with 7zip on my PC then, still on my PC I've recreated a new zip file, transferred this to the install workstation and finally I could open it!
    Hope this helps

  • Extract the zip files

    Hi,
    I want to upload and extract the zip files. However I am able
    to upload the zip file but not able to unzip it after uploading. Is
    it possible in coldfusion mx 7. I know its possible in coldfusion
    8, but I need solution in version 7. Please let me know if there is
    any free components or third-party API's.
    Thanks!

    as you know cf mx 7 does not have a built-in zip
    functionality.
    you will have to install a zip application (i.e. 7zip, which
    is free) on
    your server and use cfexecute to run it and unzip your file.
    if you are on a shared hosting you are pretty much out of
    luck - look if
    your server has a pre-installed php or other script to manage
    zip
    archives...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • One Orchestration for Multiple ZIP file FTP Solution.

    Problem:
    Zip files are being generated from multiple locations on my network. I do not need to see any information in the Zip files. My goal is to pick up the files and transfer them to various external FTP servers.
    Solution:
    BizTalk picks up the zip file using a pass-through(file) receive port. I created an orchestration because I would like to send email based on failure/success. Inside the orchestration I am using the receive port information to assign the destination party.
    The send port then filters based on destination party and sends to external FTP server.
    This gives me the ability to have 1 orchestration for multiple transfers. I wanted it to be as generic as possible. 
    1 Orchestration - 10+ Receive Locations - 8+ External FTP Sites.
    Question:
    Has anyone done this before? What should I watch out for? Do I have a good solution to my problem?

    Yes ,
    This is totally a valid business scenario were you have multiple publisher of the message and there are different subscriber( FTP sites ) for your processed message .
    You can have multiple receive location inside the same receive port and also multiple send port for different message subscription .
    So ,Its all good from your side :)
    Thanks|
    Abhishek

  • I need program to extract the zip file

    Please help me to chose the better program extract zip file from web page or email.
    Thanks

    http://osxdaily.com/2013/05/13/open-zip-files-iphone-ipad/
     Cheers, Tom

  • How to create a self-extracting downloaded Zip file ...

    I have a question about Mac file compression for an eBook PDF.  I know how to compress the file with Mac OS X 10.8.5.  I right-click the PDF I want to compress and select "Compress <file name>" from the Contextual Menu.  The file is compressed as a ZIP file.  The file I'm compressing will be distributed from a web server to Mac users.
    SITUATION:  I want the Mac user to be able to download the ZIP file to their Mac.  Once the ZIP file is downloaded to their Mac, I want the ZIP file to automatically open to place the eBook PDF on their desktop - so please indulge me here.  I know that a Mac user only needs to double-click the ZIP file to extract the eBook PDF, BUT, IF POSSIBLE, I want this to happen automatically after the ZIP file is downloaded.
    QUESTION:  Is there any way to automatially extract the eBook PDF from the ZIP file once the Mac user downloads the ZIP file to their destop?  If so, how do I do this?  If not, is there anyother way to do this that does not required any additional software like StuffIt Expander to decompress the file?  As an aside, If I compress the eBook PDF using Mac OS X 10.8.5, is this compressed ZIP file compatible with older versions of Mac OS, i.e., can they double-click the compressed ZIP file to open it?
    Thank you in advance for your comments and help . . .
    Jim Minor
    Email: [email protected]

    In OSX, zip extraction depends on the browser and browser settings. For example, Safari will open files automatically depending on this setting in Sarari Preferences: So the short answer I think is no. Your zip recipients are going to have to click on the zips to open them if their browser is not set to open them automatically.
    I'm no zip expert but I would think a zip is a zip and should be compatible with older versions of OSX. That is, 10.4 or later, which didn't include Stuffit any more. Earlier versions would need Stuffit or something similar.

  • Is it possible to extract a zip file places under DAM?

    Hi,
         I need to extract zip files while uploading in the DAM. (kind of bulk uploading using zip format).
         is it possible?  is there any default functionality available in CQ5.5.?
         Or any other solution(suggestion) applicable...
         kindly help...
    Regards,
    Fazz

    There is a process step called Unarchiver that does this:
    http://dev.day.com/docs/en/cq/current/workflows/wf-ref.html#DAM Processes
    So, you can create a workflow that does what you want.
    scott

  • Creating Zip  of multiple zip files without storing at perticular location

    Hi,
    I am having any number of files in folder called as OUTPUTFILES.And i want to create a zip file of that files e.g.If there are 3 files in outputfolder namly A,B,C..THen zips are as follows A.zip B.zip C.zip and after that i want one zipfile of these 3 zipfiles called as Main.zip without storing this A.zip,B.zip,C.zip files to any perticular location..CAn any on help me out ???
    Thanks in advance,
    Meghna

    Ur posting wrong threads , This place is for java
    peopleOnce again, shut up.

  • Extract the zip file

    Today I tried to unzip my own zip.file but encountered some problem which never happened before, everytime it says "There is already a folder with same name as the file name you specified. Specify a different name" But i coundn't find a single place to change the file name! I am so confused right now! BTW, I zipped the project from a Mac and now I am trying to unzip it on Windows.
    Thanks!

    zxcvbnm wrote:
    I am sorry, but this is an emergency and I have open it within two hours! Please help!I don't care.
    Again is this a java question?
    Despite the fact that I don't care that it is an emergency I might actually provide an answer if you actually answered my question.
    Conversely since you didn't, you now run the risk of me not answering it because, which is why I asked the question in the first place, you didn't provide enough information to provide a correct answer. Answering my question would help to do that.

  • How to FTP file and extract the zip file automatically?

    Hi,
    My app needs to FTP another site and also automatically unzip the transferred file over the internet by user clicking on one button. Any experts? thanks.

    How do you open a can of beans before you take it out of the pantry?
    However I suppose your question only sounded stupid like that, you didn't really mean it that way. One problem is that you didn't mention which way the transfer was going. I assume you are asking about getting a file and unzipping it? Many of the FTP clients described in the article that jmennen referred to allow you to get an InputStream that allows you to read bytes from the server. You would take this InputStream and wrap it in a ZipInputStream. That way you could unzip the file as you transfer it from the server, rather than having to use a temporary file between the two steps.
    But if you really meant that you wanted the unzipping to take place on the server before you did the download, no, you can't do that.

  • Extracting Zip files using PowerShell 3.0 on Windows 2008

    I’m using a script to extract data to multiple servers, I’ve tested it many times, however an issue has come up that has me stumped. When extracting the zip file, it wants to create a top level folder the same name as the zip file instead of just extracting
    the contents.  Here is a sample of my script. What I need it to do is just extract the contents to the location I specify, but not create a folder with the same name as the zip file itself. Hopefully that makes sense.
     ( now the code I used is from a sample I found online, it’s been edited to fit my needs.
    $Date
    = Get-Date
    #ERROR REPORTING ALL
    Set-StrictMode
    -Version latest
    #STATIC VARIABLES
    $search
    = ""
    $destSRC  
    = "D:\Destination\DestinationUpdate"
    $zips  
    = "D:\Source\ZipSource"
    #log start of script
    Write-EventLog
    -LogName OpsCenter
    -Source ZIP
    -EntryType Information
    -EventId 3001
    -Message "Start Extraction of Update files to
    $destSRC @
    $Date"
    #FUNCTION GetZipFileItems
    Function
    GetZipFileItems
    Param([string]$zip)
    $split =
    $split.Split(".")
    $destSRC
    = $destSRC
    + "\"
    + $split[0]
    If (!(Test-Path
    $destSRC))
    Write-Host "Created folder :
    $destSRC"
    $strDest
    = New-Item $destSRC
    -Type Directory
    $shell   =
    New-Object -Com
    Shell.Application
    $zipItem
    = $shell.NameSpace($zip)
    $items   =
    $zipItem.Items()
    GetZipFileItemsRecursive
    $items
    #FUNCTION GetZipFileItemsRecursive
    Function
    GetZipFileItemsRecursive
    Param([object]$items)
    ForEach($item
    In $items)
    If ($item.GetFolder
    -ne $Null)
    GetZipFileItemsRecursive
    $item.GetFolder.items()
    $strItem
    = [string]$item.Name
    If ($strItem
    -Like "*$search*")
    If ((Test-Path ($destSRC
    + "\"
    + $strItem))
    -eq $False)
    Write-Host "Copied file :
    $strItem from zip-file :
    $zipFile to destination folder"
    $shell.NameSpace($destSRC).CopyHere($item)
    Else
    Write-Host "File :
    $strItem already exists in destination folder"
    #FUNCTION GetZipFiles
    Function
    GetZipFiles
    $zipFiles
    = Get-ChildItem -Path
    $zips -Recurse
    -Filter "*.zip"
    | % {
    $_.DirectoryName
    + "\$_" }
    ForEach ($zipFile
    In $zipFiles)
    $split =
    $zipFile.Split("\")[-1]
    Write-Host "Found zip-file :
    $split"
    GetZipFileItems
    $zipFile
    #RUN SCRIPT
    GetZipFiles
    #log end of script
    Start-Sleep
    -Seconds 2
    $Date
    = Get-Date
    Write-EventLog
    -LogName OpsCenter
    -Source ZIP
    -EntryType Information
    -EventId 3001
    -Message "Extracted all ZIP Update files to
    $destSRC @
    $Date"
    Paul Arbogast

    @jrv
    I hate to hijack an old thread.
    I have been playing with this for the past hour.
    I have use this fine in an interactive console or the ISE.
    But as soon as I place this into a script, and then run the script " .\script.ps1 "; nothing happens.
    I obviously have some disconnect going on that I am not finding.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.
    Disclaimer: Attempting change is of your own free will.

  • Wht does safari combine multiple download into a zip file?

    I downloaded a MKV file from my NAS remotely which worked fine, however when i try to combine multiple files Safari seems to automatically ZIP the files which means I cannot tell how long the download will take or how much data is left to transfer.
    Anyone got any idea how to prevent Safari from putting multiple files into a zip?
    cheers

    I select multiple files from an online storage device, and select download. at this point for some reason when the download begins the files are combined into a zip file. when the download completes i then try to extract the zip file it often fails to extract.
    If I select any one of the selceted files individually, Safari download begins, and the completed download is not in a zip file format and the file is readable.
    I hope this makes sense to someone!
    cheers

  • Cannot extract Zip file with Winzip after zipping with java.util.zip

    Hi all,
    I write a class for zip and unzip the text files together which can be zip and unzip successfully with Java platform. However, I cannot extract the zip file with Winzip or even WinRAR after zipping with Java platform.
    Please help to comment, thanks~
    Below is the code:
    =====================================================================
    package myapp.util;
    import java.io.* ;
    import java.util.TreeMap ;
    import java.util.zip.* ;
    import myapp.exception.UserException ;
    public class CompressionUtil {
      public CompressionUtil() {
        super() ;
      public void createZip(String zipName, String fileName)
          throws ZipException, FileNotFoundException, IOException, UserException {
        FileOutputStream fos = null ;
        BufferedOutputStream bos = null ;
        ZipOutputStream zos = null ;
        File file = null ;
        try {
          file = new File(zipName) ; //new zip file
          if (file.isDirectory()) //check if it is a directory
         throw new UserException("Invalid zip file ["+zipName+"]") ;
          if (file.exists() && !file.canWrite()) //check if it is readonly
         throw new UserException("Zip file is ReadOnly ["+zipName+"]") ;
          if (file.exists()) //overwrite the existing file
         file.delete();
          file.createNewFile();
          //instantiate the ZipOutputStream
          fos = new FileOutputStream(file) ;
          bos = new BufferedOutputStream(fos) ;
          zos = new ZipOutputStream(bos) ;
          this.writeZipFileEntry(zos, fileName); //call to write the file into the zip
          zos.finish() ;
        catch (ZipException ze) {
          throw ze ;
        catch (FileNotFoundException fnfe) {
          throw fnfe ;
        catch (IOException ioe) {
          throw ioe ;
        catch (UserException ue) {
          throw ue ;
        finally {
          //close all the stream and file
          if (fos != null)
         fos.close() ;
          if (bos != null)
         bos.close();
          if (zos != null)
         zos.close();
          if (file != null)
         file = null ;
        }//end of try-catch-finally
      private void writeZipFileEntry(ZipOutputStream zos, String fileName)
          throws ZipException, FileNotFoundException, IOException, UserException {
        BufferedInputStream bis = null ;
        File file = null ;
        ZipEntry zentry = null ;
        byte[] bArray = null ;
        try {
          file = new File(fileName) ; //instantiate the file
          if (!file.exists()) //check if the file is not exist
         throw new UserException("No such file ["+fileName+"]") ;
          if (file.isDirectory()) //check if the file is a directory
         throw new UserException("Invalid file ["+fileName+"]") ;
          //instantiate the BufferedInputStream
          bis = new BufferedInputStream(new FileInputStream(file)) ;
          //Get the content of the file and put into the byte[]
          int size = (int) file.length();
          if (size == -1)
         throw new UserException("Cannot determine the file size [" +fileName + "]");
          bArray = new byte[(int) size];
          int rb = 0;
          int chunk = 0;
          while (((int) size - rb) > 0) {
         chunk = bis.read(bArray, rb, (int) size - rb);
         if (chunk == -1)
           break;
         rb += chunk;
          }//end of while (((int)size - rb) > 0)
          //instantiate the CRC32
          CRC32 crc = new CRC32() ;
          crc.update(bArray, 0, size);
          //instantiate the ZipEntry
          zentry = new ZipEntry(fileName) ;
          zentry.setMethod(ZipEntry.STORED) ;
          zentry.setSize(size);
          zentry.setCrc(crc.getValue());
          //write all the info to the ZipOutputStream
          zos.putNextEntry(zentry);
          zos.write(bArray, 0, size);
          zos.closeEntry();
        catch (ZipException ze) {
          throw ze ;
        catch (FileNotFoundException fnfe) {
          throw fnfe ;
        catch (IOException ioe) {
          throw ioe ;
        catch (UserException ue) {
          throw ue ;
        finally {
          //close all the stream and file
          if (bis != null)
         bis.close();
          if (file != null)
         file = null ;
        }//end of try-catch-finally
    }

    Tried~
    The problem is still here~ >___<
    Anyway, thanks for information sharing~
    The message is:
    Cannot open file: it does not appear to be a valid archive.
    If you downloaded this file, try downloading the file again.
    The problem may be here:
    if (fos != null)
    fos.close() ;
    if (bos != null)
    bos.close();
    if (zos != null)
    zos.close();
    if (file != null)
    file = null ;
    The fos is closed before bos so the last buffer is not
    saved.
    zos.close() is enough.

  • Can't extract Hotfixes and CU2 becuase of multidisk zip file?

    Hi experts,
      Does anyone download hoxfixes and MSSQL 2008 CU2 from microsfot but can't extract?
    I download CU2 hotfixes from microsoft but when I try to extract, there always shows self-extracting multidisk zip file. How do I solve this problem? I call microsoft but the supports say they can just extract without any problem? Why? I try on many PC/Servers.

    My company's proxy has some issue, I change it to another and everything is fine.

Maybe you are looking for

  • "Save As" crashes PS

    PS CS3, MacBook Pro, Leopard, 10.5.6, 2.33 GHz, 3 GB 667 Mhz DDR2 Whenever I try to use "Save As" in PS the program crashes. Thanks. Grant

  • Another blank thumbnail debacle

    I've searched iPhoto 6 discussion forum back and forth and although having tried all suggestions Smtr and Terence Devlin have suggested to others, I'm still having trouble. I have a little over 3,000 photos that I imported over from iPhoto 4 to iPhot

  • Anjuta fails to build project.

    So I have a "full GNOME3 desktop" installed with Anjuta, but when I try to build a new project, the assitant skips though a few panes and says the "project has successfully been built". But, nothing happens ... Is there a package i'm missing or somet

  • File sharing can not open files when transferred.

    File sharing. When files are sent over to folder on mac can not open message comes up " you do not have permission to open the document" Had no problem before loading 10.9.

  • Banshee wont run :(

    Havent been able to use banshee on any of my arch boxens both 64 bit and 32 bit, i get the same error. [smakked@spazz ~]$ banshee-1 Unhandled Exception: System.Exception: Unable to open the session message bus. ---> System.ArgumentNullException: Argu