Jump to content

ZIP UDF (zipfldr.dll library)


Recommended Posts

Flags for CopyHere method aren't working prior win7

Which flags specifically? If you're referring to that 'Compressing...' dialog from the other thread... As I said there, I believe that dialog must be created by the zipfldr.dll library, not by the shell. As such, it wouldn't be affected by any flags, specifcally flag = 4, passed to the CopyHere method.
Link to post
Share on other sites
  • Replies 221
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Here is the rewritten version of this UDF. See my comments HERE. Please test the shit out of this thing. It was a major headache, and I want to make sure I didn't miss something. Thanks! Update 20

Replace the _IsFullPath() function in ZIP.au3 with this one Func _IsFullPath($sPath) If StringRegExp($sPath, '^([a-zA-Z]\:|\\\\[^\/\\:*?"<>|]+\\[^\/\\:*?"<>|]+)(\\[^\/\\:*?"<>

Posted Images

Which flags specifically? If you're referring to that 'Compressing...' dialog from the other thread... As I said there, I believe that dialog must be created by the zipfldr.dll library, not by the shell. As such, it wouldn't be affected by any flags, specifcally flag = 4, passed to the CopyHere method.

None of the flags while unziping. XP SP3 for example.

(zipfldr.dll from Vista above no longer have dialogs within (as a resource). I don't know if that means anything.)

Edited by trancexx

♡♡♡

.

eMyvnE

Link to post
Share on other sites
  • Moderators

wraithdu,

New version looks good so far. :blink:

For interest, I am now getting the "Compressing" dialog every time, regardless of the flag setting, although if I understand you and trancexx correctly that is not surprising.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

Yep, for longer operations you'll see the 'Compressing...' dialog. I suspect it's from zipfldr.dll, so the CopyHere flags can't control it. You could check by opening zipfldr.dll with ResHacker and check out the included dialogs. I only have Win7 for testing, unless I boot up a VM (yawn...), so I don't have that dialog any more.

Link to post
Share on other sites
  • Moderators

wraithdu,

My Vista zipfldr.dll does not seem to have a dialogs within according to ResHacker, so heaven knows where the dialog is coming from. ;)

I have got it reduced to a very brief "flash" with this:

#include "Zip.au3"

AdlibRegister("Hider", 10)

$sZipFile = @ScriptDir & "\MyZip.zip"

$sRet = _Zip_Create(@ScriptDir & "\MyZip.zip", 1)
If $sRet <> $sZipFile Then Exit

$iRet = _Zip_AddItem($sZipFile, "My_Folder")
ConsoleWrite($iRet & @CRLF)

Func Hider()
    If BitAnd(WinGetState("Compressing"), 2) = 2 Then
        WinSetState("Compressing", "", @SW_HIDE)
        AdlibUnRegister("Hider")
    EndIf
EndFunc

On a positive note, the UDF is still working fine for me so far - very stable. :blink:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

Huh, tricky little dialog indeed. I would do something if I could, but I think it's beyond a user's control of the zipfldr library. Shame really, it has potential if MS had fleshed it out a bit more. It could use some compression settings as well. But it does well for my automated XYplorer updater script.

Link to post
Share on other sites

Great UDF, i downloaded the first ZIP archive i found, and this upgrades the latest for 100's %...

However, this UDF does not answer my problem.

Althought i cqan upload a zip file and go to the CPanel's admin console to extract it, i would like to make it through this UDF, is it possible?

Link to post
Share on other sites

I have not tested this against network paths for destinations. Perhaps next week I'll get an opportunity.

In the meantime, if you can mount your network paths as local drives, you should be able to use the UDF as normal.

Link to post
Share on other sites

Great Work!

Just started working with this code today, and it seems like it's going to do the job. One small item.

Error 4 returned from _Zip_AddItem() indicates "4 - ZIP file does not exist". That ran me around for a while until I realized it was actually looking at $sFileName and not $sZipFile. Just a thought.

Thanks again. This is going to be good.

Link to post
Share on other sites
  • 1 month later...

I wrote and tested this on Win7. You're going to have to provide considerably more information than that.

What information would you like?

I am running the lastest autoIT non-beta, the latest SciTE.

Windows 7 Professional.

The following script never displays "It worked!"...it just hangs at the until I stated:

#include "zip.au3"

$ZipFileFullPath = @ScriptDir & "\test.zip"
$FolderFullPath = @ScriptDir & "\test\"


$Zip = _Zip_Create($ZipFileFullPath, 1)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') :(' & @min & ':' & @sec & ':' & @msec & ') $Zip = ' & $Zip & '   :   Error code: ' & @error & '    Extended code: ' & @extended  & @crlf) ;### Debug Console


$Test = _Zip_AddItem($Zip, $FolderFullPath)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') :(' & @min & ':' & @sec & ':' & @msec & ') $Test = ' & $Test & '   :   Error code: ' & @error & '    Extended code: ' & @extended  & @crlf) ;### Debug Console
Msgbox(0,0,"It worked!")

the folder "test" just has a bunch of random .txt files in it. The zip is created, all the files get zipped...everything works, but it never returns out of the _AddItem function..it gets hung up.

Here is the output (Note the 2nd debug never shows, as its still hung up.)

@@ Debug(8) :(40:44:783) $Zip = C:\Users\Brian\Desktop\ZipSucks\test.zip : Error code: 0 Extended code: 0

Edited by ParoXsitiC
Link to post
Share on other sites

Hi i'm using the below script & its creating the zip, but its not inserting the phonetree.csv into the zip file.. the zip file is always blank..

Any ideas why this is happening?

#include <_Zip.au3>
Global $sZipFile=@ScriptDir & "\phonetree.zip"
Global $sFileName=@ScriptDir & "\phonetree.csv"
Global $sDestDir="\"
Global $iFlag=77

;create the phonetree.zip
_Zip_Create("\phonetree.zip",1)

;Then to add phonetree.csv to the zip

_Zip_AddItem($sZipFile, $sFileName, $sDestDir, $iFlag)
Edited by bb01
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...