home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
In'side Shareware 1995 April
/
ish0495.iso
/
win95
/
zipserv
/
ddezip.ba_
/
ddezip.ba
Wrap
Text File
|
1995-01-29
|
3KB
|
69 lines
'DDELabel.Caption holds the request and must be formatted as:
' fixed length string, 100 long, the path and name of the ZIP file
' 1 character long string, value 0 - Zip, 1 - Unzip
' fixed lenght string, 100 long,
' the path and name (wild characters) of the files to Zip
' or
' the destination path of the files to unzip
' one character
' 0 or 1 if not zero that keeps the date at zipping, overwrites at unzipping
' one character
' 0 or 1 if not zero that stores the path at zipping, restores the path at unzipping
Type ZipInfoVar
ZipFile As String
Task As Integer
Destination As String
FilesToZip As String
KeepDate As Integer
Overwrite As Integer
StorePath As Integer
Recursive As Integer
RestorePath As Integer
Comment As String
Password As String
End Type
Global ZipInfo As ZipInfoVar
Sub GetZipInfo (s$)
ZipInfo.ZipFile = Trim(Left$(s$, 100))
ZipInfo.Task = Val(Mid$(s$, 101, 1))
If ZipInfo.Task = 0 Then
ZipInfo.FilesToZip = Trim(Mid$(s$, 102, 100))
ZipInfo.KeepDate = Val(Mid$(s$, 202, 1))
ZipInfo.KeepDate = IIf(ZipInfo.KeepDate = 0, False, True)
ZipInfo.StorePath = Val(Mid$(s$, 203, 1))
ZipInfo.Recursive = Val(Mid$(s$, 204, 1))
ZipInfo.StorePath = IIf(ZipInfo.StorePath = 0, False, True)
Else
ZipInfo.Destination = Trim(Mid$(s$, 102, 100))
ZipInfo.Overwrite = Val(Mid$(s$, 202, 1))
ZipInfo.Overwrite = IIf(ZipInfo.Overwrite = 0, False, True)
ZipInfo.RestorePath = Val(Mid$(s$, 203, 1))
ZipInfo.RestorePath = IIf(ZipInfo.RestorePath = 0, False, True)
End If
ZipInfo.Comment = Trim(Mid$(s$, 204, 50))
ZipInfo.Password = Trim(Mid$(s$, 254, 10))
End Sub
Function ZipPass$ ()
Dim s$
s$ = ""
s$ = s$ + Left$(ZipInfo.ZipFile + String$(100, " "), 100)
s$ = s$ + IIf(ZipInfo.Task = 0, "0", "1")
If ZipInfo.Task = 0 Then
s$ = s$ + Left$(ZipInfo.FilesToZip + String$(100, " "), 100)
ZipInfo.KeepDate = Val(Mid$(s$, 202, 1))
s$ = s$ + IIf(ZipInfo.KeepDate = 0, "0", "1")
s$ = s$ + IIf(ZipInfo.StorePath = 0, "0", "1")
s$ = s$ + IIf(ZipInfo.Recursive = 0, "0", "1")
Else
s$ = s$ + Left$(ZipInfo.Destination + String$(100, " "), 100)
s$ = s$ + IIf(ZipInfo.Overwrite = 0, "0", "1")
s$ = s$ + IIf(ZipInfo.RestorePath = 0, "0", "1")
End If
s$ = s$ + Left$(ZipInfo.Comment + String$(50, " "), 50)
s$ = s$ + Left$(ZipInfo.Password + String$(10, " "), 10)
ZipPass$ = s$
End Function