unzip

  • 31 Oct

    Corrupted TAR file, error management during unzip

    Q: Error management during unzip request.

    We received a broken package (TAR file) in a folder processed by Limagito. The rule is to unpack any zip or tar file arriving in that folder and then move the zip or tar file.
    But for the broken package “example.tar” the file remains in the folder and is processed again and again.

    22/10/2021 14:51:47 Execute: ID1[ZIP]\\nas\Media\Work\FilesUnpack\
    22/10/2021 14:51:47 7z Item Count of \\nas\Media\Work\example.tar: 4
    22/10/2021 14:51:47 7z Item 1, File: \\nas\Media\Work\FilesUnpack\.\example1.jpg
    22/10/2021 14:51:47 7z Item 2, File: \\nas\Media\Work\FilesUnpack\.\example2.jpg
    22/10/2021 14:51:47 7z Item 3, File: \\nas\Media\Work\FilesUnpack\.\example.mpg
    22/10/2021 14:52:19 7z Extract Selected Exception: Data error
    22/10/2021 14:52:19 UNZIP Error \\nas\Media\Work\example.tar to \\nas\Media\Work\FilesUnpack\;3560701952

    The file is not moved. The process never ends. I configure the error notification by mail. And this works. What would be your advice to manage this?
    EX: move the file in error in another folder.

    A: In version v2021.10.30.0 we added a Pascal Script var to achieve your request. psDeleteAfterCopy which is an integer can only be used in the Destination Pascal Script (0 = error occurred, we will not delete the Source file).

    Some screenshots to get you started. We assume the Source (WIN, scanning compressed files) and Destination (UNZIP) part is already setup in our File Mover. So to add error management to this setup you’ll have to add ‘Pascal Script’ as second Destination. Important, the Pascal Script must come after the UNZIP.

    Limagito File Mover Destination Setup

    Add the following Pascal Script code, do not forget to adjust the crErrorPath constant, it must end with \ :

    Const
      ctErrorPath = 'C:\Test\Error\';
    Begin
      psExitCode:= 1;
      // ... add your code here
      If psDeleteAfterCopy = 0 Then
      begin
        If psMoveFile(psFilePath + psFileName, ctErrorPath + psFileName) Then
          psLogWrite(1, '', 'Moved ' + psFilePath + psFileName + ' to ' + ctErrorPath)
        Else
          psLogWrite(1, '', 'Move Error of ' + psFilePath + psFileName + ' to ' + ctErrorPath);
      End;
    End.

    Limagito File Mover Pascal Script as Destination

    In case of error the source file will be moved to the ctErrorPath, in our case it is: C:\Test\Error\

    Limagito File Mover RunTime Log

    #FileTransfer

    If you need any info about this ‘error management during unzip’ question, please let us know.

    Best regards,

    Limagito Team

  • 08 Oct

    Howto unzip JPG from ZIP files using Limagito File Mover

    Q: I would like to unzip JPG from a ZIP files. Every ZIP files contain JPG, XML. I would try to extract only JPG files from ZIP, but I can’t do it. All files are extracted, that obliges me to add deletion rule to delete XML files in the target folder.  Is it possible to build a rule, and ask for extract only .JPG files from ZIP ?

    A: In version v2021.10.8.0 we added a new Extract Mask option in the UNZIP Destination Setup to achieve this. We immediately added an include and exclude Extract Mask.

    • Extract Include Mask ( default *.* )
    • Extract Exclude Mask ( default ‘blanco’ )

    In this example we set the ‘Extract Include Mask’ to  *.jpg  so only jpg files form the zip (or other compressed file) will be extracted.

    Limagito File Mover Extract Mask

    #FileTransfer

    If you need any info about this ‘unzip JPG from a ZIP’ request, please let us know.

    Best regards,

    Limagito Team

    By Limagito ZIP , ,
  • 27 Oct

    UNZIP Decompression formats

    Dear Users,

    Regarding LimagitoX v2019.10.27.0

    On request we’ve added support for some extra Decompression formats. Automatic conversion of non allowed (Unix) char in packed files and folders to underscores was also added. To achieve this we are using the famous 7z.dll. The dll (v16.04) and License file 7z.License.txt were added to the installer.

    Supported decompression formations (according to 7z docu):

    BZ2
    Rar
    Arj
    Z
    Lzh
    7z
    Cab
    Nsis
    Lzma
    Lzma86
    Pe
    Elf
    Macho
    Udf
    Xar
    Mub
    Hfs
    Dmg
    Compound
    Wim
    Iso
    Bkf
    Chm
    Split
    Rpm
    Deb
    Cpio
    Tar
    GZip
    Xz
    Ntfs
    Fat
    Mbr
    Vhd
    Mslz
    Flv
    Swf
    Swfc
    APM
    Ppmd
    TE
    UEFIc
    UEFIs
    SquashFS
    CramFS
    Ext
    VMDK
    VDI
    Qcow
    GPT
    Rar5
    IHex
    Hxs

    Regards
    Limagito Team

    By Limagito ZIP , ,
1 2