Jump to content
Sign in to follow this  
souldjer777

Zip32.au3 - Can't zip a folder with periods in it?

Recommended Posts

Good Morning AutoIT Gurus!
First - props to AutoIT and props to you guys  :thumbsup:
It's an incredibly rich featured programming language - Thank you, thank you, thank you!
 
 
Here is my issue with using the <Zip32.au3>
If my folder name has periods in it, the zip function fails:
 
Script Portion:
$FolderName01 = "Computer_IP_192.168.2.1"
; Example formatting:
; _ZIP_Archive($ZipFile, $DirToZip)
_ZIP_Archive($FolderName01, @ScriptDir & '' & $FolderName01)
 
Console Output:
!> _ZIPPrint: zip I/O error
!> _ZIPPrint: zip error: Could not create output file (Computer_IP_192.168.2.1)
 
Basically this Zip32.au3 can't zip folders with periods in them.
Is this something discovered already?
 
This is my current work around:
$FolderName01 = StringRegExpReplace( $FolderName01, "[.]", "_")
 
Just wondering if there is an update because I love the function Zip32.au3!
"I put that sh** on everything" like Frank's Redhot  :idiot:
 
Thanks!
Edited by souldjer777

"Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"
Song Title: I guess you could say
Artist: Middle Class Rut

Share this post


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
Sign in to follow this  

  • Similar Content

    • By Scriptmaster
      <NEWBIE ALERT>
      Is it possible to unzip a zip file in Autoit without using a dll!
      My script downloads a zip file to a temporary directory (successfully) and it must be unzipped to (Or moved to after unzip) another a folder which just happens to be
      @scriptdir & "file.exe" Thanks in advance
    • By Tersion
      Here the this wiki page with list of available UDFs for data compression. For my tasks I only need ZIP support, so I started looking at pure AutoIt UDFs without any 3rd party dlls. And found out that most of available realizations uses standard ("native method") Windows dll - "zipfldr.dll". So for now I chose ZIP UDF by wraithdu. I've tested it on Windows 7 (x64) and it seem works fine. But here the comment from another topic where user says that Windows 10 discontinued support of "zipfldr.dll". Now I confused. I don't have around any Windows 10 machine to tested it. So maybe someone could confirm or deny that? Or maybe would better to switch to UDF with 7zip dll?
      I need an advice...
    • By tintin92
      Hello,

      How can I automatically download a list of zip files, like the ones in the quote, using a AutoIt script?
      Is it possible with AutoIt script?
       
    • By ur
      I got a UDF to zip the files from below link.
      With this I am able to create a zip file but the post processing of zip file creation I am checking the zip file exists or not, but it is giving the message as file not found.
       
      Any sugestions??
      #include "Zip.au3" ZipLogs() Func ZipLogs() $ResultsFolder = @ScriptDir & "\Results" $ResultsDestFolder = @ScriptDir & "\Results_Archive" $zipFile = $ResultsDestFolder & "\Results_"&TodayDateTime()&".zip" DirCreate($ResultsDestFolder) Dim $Zip = _Zip_Create($zipFile) ;Create The Zip File. Returns a Handle to the zip File _Zip_AddFolderContents($Zip, $ResultsFolder) ;Add a folder's content in the zip file if FileExists(@ScriptDir&"\Logging.log") then _Zip_AddFile($Zip,@ScriptDir&"\Logging.log") FileDelete(@ScriptDir&"\Logging.log") EndIf if FileExists(@ScriptDir&"\RemoteExecution_Log.txt") then _Zip_AddFile($Zip,@ScriptDir&"\RemoteExecution_Log.txt") FileDelete(@ScriptDir&"\RemoteExecution_Log.txt") EndIf if FileExists($zipFile) then DirRemove($ResultsFolder,$DIR_REMOVE) Else MsgBox(0,"","Zip file not found") EndIf return $zipFile EndFunc  
      Zip.au3
    • By ur
      There is a build machine in the network where it will automatically download the code from source repository and compile using visual studio and compresses the complete code in a zip file.
      I have added a line at the end of the build script(written in python on that machine) to copy that zip file to my ESX Virtual machine.
      Where I kept a AutoIT exe to wait for the zip file, once it is copied then I will extract the contents and find only the dll files in the extracted folder and do the Install creation using Installshield silently and copy the created setup files to anther machine.
      I wrote the script till the setup files creation.
       
      But now the problem is, when the zip file is copying through network, the autoit script is detecting it even the copy is still in progress and trying to extract the zip file and failing.
      Even when I am checking whether the file in use is not working.
       
      Any suggestion on how to check whether the copy is completed.?
×
×
  • Create New...