Unzipping the file at AE

Hi ,
I am doing file to idoc scenario. I am getting the file in zip format. File adaptor poll the file in zip format, Now my requirement is to extract the file in text format before content conversion .... can we use the OS command option in sender file adaptor configuration if yes  then how????
Thanks in advanve
Regards
Swatantra

Hi Vijay,
In Sender file configuration ( In communication channel ) it allows to call the OS system commands and process them before calling mapping program .
In your Communication channel in "Run operating System Command Before Message Processing " set a system command which extracts the zip file located in the path specified
The command format is:
    winzip32 -e [options] filename[.zip] folder
Sample :::
C:\Program Files\WinZip>WINZIP32 -e Example.zip Example
After extracting you will get a folder get created by the name specified in command if it doesnot exist. Set polling on that folder with the filename like *.txt and process it with file content conversion.
Let me know if you have queries.
Nanda

Similar Messages

  • Unzip the file

    I need to Unzip a file from Folder 1 and place it in Folder2.
    Folder 1 has a zip file, which a txt file embedded in it. PI need to unzip the file and place the file in Folder2 with same name.
    I have created a Configuration Scenario for this, no IR objects.
    I have used PayloadZipBean with ModuleConfiguration as
    ParameterName- zipmode and ParamterValue - unzip in my sender file channel and same  is used in receiver channel.
    For some reason when I see the payload in sender communication channel log, it is automatically converted to XML with some junk values along with the data.
    Another issue is although I have checked the Adapter Specific Properties on both the channels, it expects a name on Receiver file channel. So I have given a dummy name there. File got created in Folder2 but with some junk values in XML format.
    Any thoughts please.

    Thank You both.
    Greg - your idea worked.
    On the other issue looks like I can not use Adapter Specific Properties on both the channels. when I use ASMA File got created in Folder2 but with some junk values in XML format.
    Looks like it expects a name on Receiver file channel. So I have given a dummy name there.
    Edited by: Vamsi on Feb 23, 2012 6:15 PM

  • Unzip the file archived by the File adapter

    Hi Experts,
    we have a scenario where we are archiving a xml file using the File adapter and also it is being zipped by the OS command.
    the script not only zips the file, it also rename the file from *.zip to *.xml.
    Hence after archiving when I am trying to open it, the content appears to be junk.
    Please suggest how to unzip the file as it got a extension *.xml.
    And I also tried renaming the file to *.zip and then to uncompress, but it shows below error
    Cannot open : it does not appear to be a valid archive
    Thanks in advance,
    MK

    hi Mk,
    instead of using OS command try using the exesting module provided by the SAP, so your job will be easy.
    follow this steps in the module processing for UN ZIP
    Processing sequence:
    Module name: AF_Modules/PayloadZipBean
    Type: Local Enterprise Bean
    Module key: 3
    u2022 Module configuration:
    Module key: 3
    Parameter name: zip.mode
    Parameter value: unzip.
    in the commincation channel specify filename.xml
    so you can open the file in XML format
    Thanks,
    Madhav
    Note:points if useful
    Edited by: madhav poosarla on Aug 14, 2008 8:31 AM

  • When I try to unzip the files I get the following error msg "checksum error in adbeapecore.dll"

    when I try to unzip the files I get the following error msg "checksum error in adbeapecore.dll"

    Hi,  
    We are tracking this issue at:
    http://forums.adobe.com/message/4286522#4286522
    Please follow the steps and update thread if your issue is resolved.
    Regards,
    Ashutosh

  • How to remove zip file after unzipping the file

    I'm trying to delete zipfile in my program after unzipping the file. any suggestions? provide any sample code.
    Thanks
    kishore

    File.delete()

  • Unzipping the file downloaded from Oracle forum

    Dear All,
    Hope im in the right discussion room.
    I downloaded the Oracle 11g from Oracle Forum (special thanks to Oracle) but i also saw that it has a special unzipping software to unzip the downloaded files.
    Can i use the WinZip to unzip or any other softwares to be used to unzip.
    I am using Windows 7 ultimate.
    Any help would he highly appreciated.

    Hi;
    >
    Hope im in the right discussion room.
    I downloaded the Oracle 11g from Oracle Forum (special thanks to Oracle) but i also saw that it has a special unzipping software to unzip the downloaded files.
    Can i use the WinZip to unzip or any other softwares to be used to unzip.
    I am using Windows 7 ultimate.If your download file extantion is zip than yuo can use Winzip wihtout any issue
    Regard
    Helios

  • Hi, How to unzip the file in java.........urgent........plz.......!

    Hi Friends,
    I'm new to Java. I have problem in java.uitl.zip.*; api. I want zip the set of files into .zip and unzip the zip file. it is successfully working in my pc. i want unzip this zip into another system which is conncted to lan.
    it raise exception like Context file path exception and unzip exception.
    plz help me for this problem.

    all4u wrote:
    I need this solution urgently... plz... help me.......Oh it's urgent. Well why didn't you tell us that in the first place?
    Well no worries just stand by and I shall mind-meld to your IDE, spot your problem and post your fixed codes shortly. Just please be very patient and quiet because if you post again it could throw the mind-meld into disarray and make me post code for a JDBC connection error rather than your zip problem and nobody wants that.

  • When I try to download Firefox for Windows, it unzips the file and says it cannot find 7-Zip file and stops download

    I have windows 7 on a desktop. I had firefox before which worked fine then I attached a router to my computer that may have been defective and may have damaged the computer. I took the router off. Firefox suddenly reverted back to the start up page of when you are new to firefox, e.g. here's how it works, and stopped loading my normal home page. Even though I entered the tabs I wanted for my startup home page every time I shut down my computer it went back to the beginning thinking I had only just loaded it. I did lots of system diagnostics but nothing appeared to be wrong with my computer so I uninstalled Firefox, restarted, then downloaded it again. When I download it, it says run or save and I choose run. Then it extracts the file and a message comes up that says "7-Zip. Cannot find file. Then nothing more happens. No files are downloaded to my computer and it's as though I never tried to download it.

    SAVE the installer to your hard drive (do not use the "Run" option); save it to your Desktop so that you can find it. When the download is complete, close whatever browser you have open, click or double-click the file you downloaded and see if it installs without a problem.
    The downloader is a self-extracting archive and should not need or use 7-zip. I have 7-zip installed on my system and it does not interfere with nor is it used in the Firefox install process. Hopefully, you have not set the downloading of .exe files to be associated with 7-zip.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • Not in GZIP format error while trying to unzip the file

    I'm using GZIPInputStream in order to read data from zipped file.
    It worked perfectly from command line. I have to execute the same code from crontab and it gave me the exception:
    java.io.IOException: Not in GZIP format
    It tries to check the GZIP_MAGIC number and for some reason failed.
    The stack trace I'm getting points to GZIPInputStream constructor.
    GZIPInputStream input = new GZIPInputStream( new FileInputStream( fileName));
    Any help will be highly appreciated.
    Thanks,
    Arnold

    This may be a little late for you, but I am having the same problem. I am using an encryption package as well. I created input and output streams to wrap my encryption package. (javax.?? has something similar)
    Anyway, my algorithm goes: data -> gzip -> encrypt --------- ->decrypt -> gzip ->data
    If I used encryption without the gzip everything works fine, and if I use gzip without the encryption it works fine as well. But if I use them in conjuction, bad thing happen.
    I copied versions of the GZIPInput and output stream classes from java.util.zip and made my own so I could put in debug code. Then I saw what was happening. GZIP writes a header of 8b1f. It does this by writing a first to 1f as a byte (this is 31 in decimal) and then the 8b (this is 139 unsigned byte or -117 signed byte).
    My debug code shows that it writes 31,-117 to the stream, but reads 31,139 when I don't use encryption and 31,-117 when I do. Another strange thing about this, though, is that everywhere I have debug code, this is the only byte that prints out unsigned in my debug messages... When encryption is turned on this same debug message prints -117.
    I have no idea why this is happening. To test things some more, I changed my copy of the gzipinputstream to compare this header value with the GZIP_MAGIC number (35615) and with -29921. Now everything works perfectly. There has to be a better solution for this, but I don't know what it is yet.
    GZIP_MAGIC is 8b1f sent as two bytes 1f and then 8b, and then shifting the 8b.
    -117, using the Integer.toString(-117,16), gives a hex of -75. Using the same methodology as above, we can get -751f which is -29921.
    The header check is essentially:
    if ((int)readUByte(in) << 8) | (int)readUByte(in) != GZIP_MAGIC)
    your screwed
    So change this store the value in a variable and compare it to GZIP_MAGIC and -29921 and your problem will disappear.
    I am not sure what they were thinking. readUByte is a simple read. There is nothing unsigned about it. There is probably some casting somewhere along here that is causing the error, but nothing I am doing seem incorrect.
    Hope this helps. Actually, I hope you have solved your problem by now, but if not,... If you have any insights, I would appreciate hearing them.

  • How to prevent arrayindex out of bounds exception while unziping the files

    hi all ,
    i am new to java.Can any body help me to solve my problem.here is my problem.
    here i am trying to unzip a ziped file. but i am getting arrayindex out of bounds exception at line no 12 (args[0]), my quesion is to how to prevent arrayindex out of bounds exception ? please give me clear explanation.
    public class UnZip2 {
    static final int BUFFER = 2048;
    public static void main (String args[]) {
    try {
    BufferedOutputStream dest = null;
    BufferedInputStream is = null;
    ZipEntry entry;
    ZipFile zipfile = new ZipFile(args[0]);
    Enumeration e = zipfile.entries();
    while(e.hasMoreElements()) {
    entry = (ZipEntry) e.nextElement();
    System.out.println("Extracting: " +entry);
    is = new BufferedInputStream
    (zipfile.getInputStream(entry));
    int count;
    byte data[] = new byte[BUFFER];
    FileOutputStream fos = new
    FileOutputStream(entry.getName());
    dest = new
    BufferedOutputStream(fos, BUFFER);
    while ((count = is.read(data, 0, BUFFER))
    != -1) {
    dest.write(data, 0, count);
    dest.flush();
    dest.close();
    is.close();
    } catch(Exception e) {
    e.printStackTrace();
    }

    how you run it?
    java Unzip2?
    args[0] refer to first parameter in run command, so u should run it by giving a parameter. eg:
    java Unzip2 someFile.zip

  • I'm running Firefox 7.0.1 and since the September 30 security update I can no longer unzip zipped files unless I reboot my computer first or run it in Safe Mode. Can anyone help me roll Firefox back to before the update?

    I regularly download zipped files from Survey Monkey. Since the latest security update, the zipped files download to my computer, but when I try and unzip them I get a message telling me the file is in use by another application. If I reboot, I can unzip the file, or if I'm in Safe Mode when I download the file it unzips fine.
    I have tried three different unzip apps and all have the same trouble. Everything was working well after the September 5 update.
    I'm running Windows XP with McAfee antivirus, Spybot, Ad-Aware and Malbytes Anti-malware. All are up to date.

    The URL below is to Adobe's Acrobat update page.
    There you'll find each of the incremental updates to Acrobat 10.
    They must be installed one at a time in sequence. 
      http://www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows
    Now, if after attempted updates fail then you'll need to speak with your IT Department.
    You need your install of Acrobat 10 updated to dot version 10.1.7.
    Be well...
    Message was edited by: CtDave

  • Unable to unzip the downloaded files

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    After downloaded the 9i for Windows (disk1,disk2,disk3). I cnnot unzip the file. I get the foloowing message from WinZip message box: "The WinZip Wizard cannot open this file; it does not appear to be a valid archive. If you downloaded this file, try downloading again. If you want to add the file to an archive, first create or open the archive, then drop the file again."
    I downloaded the file again and still get the same message. What do I need to do? Thank you for your help.
    - Server name
    - Filename 92010NT_disk1.zip
    - Date/Time
    - Browser + Version
    - O/S + Version
    - Error Msg

    It is quite easy to solve your problem. Double click your disk1 or anyone of the 3 and right click the zipped folder then click on extract all. Do the same for all the 3 disks. You should find at the end exe file on disk1. Good luck

  • Unzip a file preserving the folder structure

    Hi guys,
    I have create a zip file using java.util.zip and I preserv all directory structure. When I unzip the file using the same library, in the loop of ZipEntry I don't find never a directory. This the code that I use and don't work:
    public void dataDecompression(String pathArchivio) {
        try {
            fileInputStream = new FileInputStream(pathArchivio);
           checkedInputStream = new CheckedInputStream(fileInputStream, new Adler32());
           zipInputStream = new ZipInputStream(new BufferedInputStream(checkedInputStream));
           ZipEntry entry;
           while((entry = zipInputStream.getNextEntry()) != null){
                if(entry.isDirectory()){
                     //make dir          
               else{
                    //write file
    }Maybe I miss something in compression? Excuse for my bad english.
    Thanks in advance.

    three problems with that.
    1) you don't recusively create folders.
    2) you create a folder with the name of the file you want to write.
    3) you don't create files.
    File file=new File(entry.getName());
    if(file.getParentFile()!=null);
         file.getParentFile().mkdirs();
    if( !entry.isDirectory() ) {
    //code that write file;

  • Decrypt and unzip a File + read a XML file received into the ZIP

    Hello,
    I need your help to develop some a complex Biztalk application.
    Here're my needs :
    Our Busness partner send us a zip file cripted with a standard PGP(Pretty Goof Privacy).
    The zip containts an XML file that i have to deal it, and some attachments file(PDF).
    So i need to know what's the best approach for the developpement of my application.
    I want to decrypt the ZIP and then Unzip the file and them read the XML file received in the zip.
    Knowimg that we already have the pipeline compenent to dectypt the file with the strandar PGP and an other pipeline compenent to unzip the File.
    Thank you

    Hi ,
    Try this code to unzip the file and send the xml message .If u face issue let me know
    namespace BizTalk.Pipeline.Component.DisUnzip
    using System;
    using System.IO;
    using System.Text;
    using System.Drawing;
    using System.Resources;
    using System.Reflection;
    using System.Diagnostics;
    using System.Collections;
    using System.ComponentModel;
    using Microsoft.BizTalk.Message.Interop;
    using Microsoft.BizTalk.Component.Interop;
    using Microsoft.BizTalk.Component;
    using Microsoft.BizTalk.Messaging;
    using Ionic.Zip;
    using System.IO.Compression;
    [ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
    [System.Runtime.InteropServices.Guid("8bef7aa9-5da5-4d62-ac5b-03af2fb9d280")]
    [ComponentCategory(CategoryTypes.CATID_DisassemblingParser)]
    public class DisUnzip : Microsoft.BizTalk.Component.Interop.IDisassemblerComponent, IBaseComponent, IPersistPropertyBag, IComponentUI
    private System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("BizTalk.Pipeline.Component.DisUnzip.DisUnzip", Assembly.GetExecutingAssembly());
    #region IBaseComponent members
    /// <summary>
    /// Name of the component
    /// </summary>
    [Browsable(false)]
    public string Name
    get
    return resourceManager.GetString("COMPONENTNAME", System.Globalization.CultureInfo.InvariantCulture);
    /// <summary>
    /// Version of the component
    /// </summary>
    [Browsable(false)]
    public string Version
    get
    return resourceManager.GetString("COMPONENTVERSION", System.Globalization.CultureInfo.InvariantCulture);
    /// <summary>
    /// Description of the component
    /// </summary>
    [Browsable(false)]
    public string Description
    get
    return resourceManager.GetString("COMPONENTDESCRIPTION", System.Globalization.CultureInfo.InvariantCulture);
    #endregion
    #region IPersistPropertyBag members
    /// <summary>
    /// Gets class ID of component for usage from unmanaged code.
    /// </summary>
    /// <param name="classid">
    /// Class ID of the component
    /// </param>
    public void GetClassID(out System.Guid classid)
    classid = new System.Guid("8bef7aa9-5da5-4d62-ac5b-03af2fb9d280");
    /// <summary>
    /// not implemented
    /// </summary>
    public void InitNew()
    /// <summary>
    /// Loads configuration properties for the component
    /// </summary>
    /// <param name="pb">Configuration property bag</param>
    /// <param name="errlog">Error status</param>
    public virtual void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, int errlog)
    /// <summary>
    /// Saves the current component configuration into the property bag
    /// </summary>
    /// <param name="pb">Configuration property bag</param>
    /// <param name="fClearDirty">not used</param>
    /// <param name="fSaveAllProperties">not used</param>
    public virtual void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, bool fClearDirty, bool fSaveAllProperties)
    #region utility functionality
    /// <summary>
    /// Reads property value from property bag
    /// </summary>
    /// <param name="pb">Property bag</param>
    /// <param name="propName">Name of property</param>
    /// <returns>Value of the property</returns>
    private object ReadPropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName)
    object val = null;
    try
    pb.Read(propName, out val, 0);
    catch (System.ArgumentException )
    return val;
    catch (System.Exception e)
    throw new System.ApplicationException(e.Message);
    return val;
    /// <summary>
    /// Writes property values into a property bag.
    /// </summary>
    /// <param name="pb">Property bag.</param>
    /// <param name="propName">Name of property.</param>
    /// <param name="val">Value of property.</param>
    private void WritePropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName, object val)
    try
    pb.Write(propName, ref val);
    catch (System.Exception e)
    throw new System.ApplicationException(e.Message);
    #endregion
    #endregion
    #region IComponentUI members
    /// <summary>
    /// Component icon to use in BizTalk Editor
    /// </summary>
    [Browsable(false)]
    public IntPtr Icon
    get
    return ((System.Drawing.Bitmap)(this.resourceManager.GetObject("COMPONENTICON", System.Globalization.CultureInfo.InvariantCulture))).GetHicon();
    /// <summary>
    /// The Validate method is called by the BizTalk Editor during the build
    /// of a BizTalk project.
    /// </summary>
    /// <param name="obj">An Object containing the configuration properties.</param>
    /// <returns>The IEnumerator enables the caller to enumerate through a collection of strings containing error messages. These error messages appear as compiler error messages. To report successful property validation, the method should return an empty enumerator.</returns>
    public System.Collections.IEnumerator Validate(object obj)
    // example implementation:
    // ArrayList errorList = new ArrayList();
    // errorList.Add("This is a compiler error");
    // return errorList.GetEnumerator();
    return null;
    #endregion
    /// <summary>
    /// this variable will contain any message generated by the Disassemble method
    /// </summary>
    private System.Collections.Queue _msgs = new System.Collections.Queue();
    #region IDisassemblerComponent members
    /// <summary>
    /// called by the messaging engine until returned null, after disassemble has been called
    /// </summary>
    /// <param name="pc">the pipeline context</param>
    /// <returns>an IBaseMessage instance representing the message created</returns>
    public Microsoft.BizTalk.Message.Interop.IBaseMessage
    GetNext(Microsoft.BizTalk.Component.Interop.IPipelineContext pc)
    // get the next message from the Queue and return it
    Microsoft.BizTalk.Message.Interop.IBaseMessage msg = null;
    if ((_msgs.Count > 0))
    msg = ((Microsoft.BizTalk.Message.Interop.IBaseMessage)(_msgs.Dequeue()));
    return msg;
    /// <summary>
    /// called by the messaging engine when a new message arrives
    /// </summary>
    /// <param name="pc">the pipeline context</param>
    /// <param name="inmsg">the actual message</param>
    public void Disassemble(Microsoft.BizTalk.Component.Interop.IPipelineContext pc, Microsoft.BizTalk.Message.Interop.IBaseMessage inmsg)
    IBaseMessage Temp = inmsg;
    using (ZipFile zip = ZipFile.Read(inmsg.BodyPart.GetOriginalDataStream()))
    foreach (ZipEntry e in zip)
    var ms = new MemoryStream();
    IBaseMessage outMsg;
    outMsg = pc.GetMessageFactory().CreateMessage();
    outMsg.AddPart("Body", pc.GetMessageFactory().CreateMessagePart(), true);
    outMsg.Context=inmsg.Context;
    e.Extract(ms);
    string XMLMessage = Encoding.UTF8.GetString(ms.ToArray());
    MemoryStream mstemp = new System.IO.MemoryStream(
    System.Text.Encoding.UTF8.GetBytes(XMLMessage));
    outMsg.GetPart("Body").Data = mstemp;
    _msgs.Enqueue(outMsg);
    #endregion
    Thanks
    Abhishek

  • Where in Photoshop directory do I unzip the following file

    Hi,
    I found some royalty free frames on the internet that I used before, but I reinstalled my Adobe Photoshop CS due to computer problems, and can't remember where I extract the file to. The link is as follows:
    http://gimei.deviantart.com/art/15-illustration-frames-61296653
    It's the 15 ornate frames downloaded in a .zip file. I have Win 7. Please help. Thanks in advance.

    It's a psd file with frames on different layers, so it doesn't install in any specific place for photoshop.
    Just unzip the file in the place of your choosing, open the psd in photoshop and drag a frame over to
    the photo you want to use it on.
    MTSTUNER

Maybe you are looking for

  • No music in iTunes library and it wont read the content of my iPod? Help please!

    So I recently updated to iTunes 10.7 and when I did, all of the content in the iTunes library was gone! i have tried many different things to get it to work, like restoring to a previous iTunes library, but it appears that all the previous iTunes lib

  • Viewing .RAF RAW files in Bridge CS5 on a Mac OS 10.6.8

    I have just purchased a Fuji X30 Camera and cannot view the .RAF RAW files in Bridge CS5... I have a Mac OS 10.6.8 What do I need to do?  Thanks, Webb

  • Global Variable in Progress Bar

    I have an existing labview code that is comprised of a main vi, which is the user GUI, and several (approx 70) sub vi's. I am trying to add a progress bar to the front screen (User GUI) that will immediately increment after it hits certain sections o

  • Linking to external topics

    Hi - I'm hoping someone can advise me on this: I have three WebHelp projects. I would like the user to be able to open one project and then click a link to the starting topic of one of the other projects. That topic and project would then replace the

  • Error question element8

    I finished my vedio settings and all the things and then I kicked the Disc of Share... however it was making the disc file... everything was okay but until lastly it showed the "device error - the target device isn't suitable for use" why did it happ