Sign in to follow this  
Followers 0
strate

Possible to create a zipped folder?

3 posts in this topic

Is it possible to create a compressed\zipped folder thru command line or something that the user won't see happen? If so is it possible to set the password at the same time?

Maybe other options are available to me. I want to be able to put my log files into a secure location so that the other users of the pc are unable to easily view/edit them. Thoughts?


INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...

Share this post


Link to post
Share on other sites



Is it possible to create a compressed\zipped folder thru command line...

Bring up a "DOS" window. Type/enter help.

Do you see compact?

Type/enter help compact.

The "/c" option might do what you want.

As to your other questions - I'm not sure, read more "help"... see what is in there :-)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

HI,

maybe something like this:

Func zipTXT()
    $oShell = ObjCreate("Shell.Application")         ; Create s shell Object
    $ZipAchive = @ScriptDir & "\" & 'TM_PCInfo2.0.zip'
    If IsObj($oShell) Then
        initZip($ZipAchive)                       ; Create an emtpy zip file with header
        $oDir = $oShell.NameSpace ($ZipAchive)  ; Use the zip file as an "Folder"
        For $i = 10 To 1 Step - 1
            $oDir.CopyHere ($avArray[$i])           ; Copy the 10 files in the "Zip Folder"
        Next
        Sleep(700)                              ; Give the Objekt a litte bit time to work
    Else
        MsgBox(0, "Error", "Error creating Object.")
    EndIf
EndFunc ;==>zipTXT

Func initZip($zip_path_name)
    $init_zipString = Chr(80) & Chr(75) & Chr(5) & Chr(6) ; Create the Header String
    For $n = 1 To 18
        $init_zipString = $init_zipString & Chr(0)      ; the Header
    Next
    $file = FileOpen($zip_path_name, 2)
    FileWrite($file, $init_zipString)                    ; Write the string in a file
    FileClose($file)
EndFunc ;==>initZip

; ----------------------------------------------------------------------------

; Author: mozart90 + Thorsten Meger

; Script Function: Easy Zip compression under Win XP

; ----------------------------------------------------------------------------

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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  
Followers 0