Jump to content

Looking for help to make my function run faster


gte
 Share

Recommended Posts

The dll file is attached, that is necessary to test this with.

It takes about 6 times as long with this dll/script, as it does using the OEM XP compression dll. I can't use that one though, because it won't work on server 2000 and this dll seems to be OS independent?

Any help/improvements would be appreciated. I'm trying to get the windows one to work also, but I'm not sure that's going to pan out, so it'd be nice to have a comparable alternative.

FileInstall("C:\file includes\xzip\xzip.dll", "c:\winnt\system32\xzip.dll", 1)


_unziposindependent()



func _unziposindependent()

 

           ; Local $objZip

           ;$objZip = ObjCreate("XStandard.Zip")

           ;If IsObj($objZip) Then
           ;    $objZip.UnPack("d:\dma\fecs\downloadbak\test\ACSKL1.R090914.AAAA29.DS010Z.ZIP", "C:\Temp\testxmls", "*.xml")

            ;Else
            ;MsgBox(0,0, "Can't find object")
        ;EndIf
        
    Local $sZipFile="d:\dma\fecs\downloadbak\test\"
    Local $sFolderStructure= "C:\Temp\testxmls" 
    Local $oShell = ObjCreate("Shell.Application")
    Local $oOriginFolder = $oShell.NameSpace($sZipFile) 
    
    If Not IsObj($oOriginFolder) Then
        MsgBox(0, "Set Error", 3)
        Return SetError(3, 0, 0) ; unavailable location
    EndIf
        MsgBox(0, "oOriginFolder", $oOriginFolder.items.count)
        
        local $hList = $oOriginFolder.Items
        local $item
        local $found = 0
        local $sFilename
        local $itemCount=$oOriginFolder.items.count
        
        if ($itemCount >0) Then
            Local $objZip = ObjCreate("XStandard.Zip")
            For $item in $hList
                $sFilename=$item.name
                $objZip.UnPack($sZipFile & $sFilename, $sFolderStructure, "*.xml")
            Next
        EndIf
EndFunc

xzip.dll

Link to comment
Share on other sites

Take a look at using the command line version of 7zip (7za.exe) and you will save yourself a lot of trouble.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

7zip site. All you need is the command line version.

EDIT:

http://downloads.sourceforge.net/sevenzip/7za465.zip

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...