home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMain
- Caption = "Zipping Test Form"
- ClientHeight = 3300
- ClientLeft = 2580
- ClientTop = 1980
- ClientWidth = 7170
- Height = 3720
- Icon = "UNZIP.frx":0000
- Left = 2520
- LinkTopic = "Form1"
- ScaleHeight = 3300
- ScaleWidth = 7170
- Top = 1620
- Width = 7290
- Begin VB.Frame Frame1
- Height = 3270
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 7155
- Begin VB.CommandButton btnGetCC
- Caption = "Get C&&C Files"
- Height = 435
- Left = 5670
- TabIndex = 16
- Top = 840
- Width = 1380
- End
- Begin VB.TextBox txtTextFile
- Height = 285
- Left = 1785
- TabIndex = 15
- Text = "*.txt;*.doc"
- Top = 2835
- Width = 3690
- End
- Begin VB.TextBox txtMissionIni
- Height = 285
- Left = 1785
- TabIndex = 13
- Text = "Mission.ini"
- Top = 2520
- Width = 3690
- End
- Begin VB.TextBox txtSaveGameName
- Height = 285
- Left = 1785
- TabIndex = 12
- Text = "SaveGame.*"
- Top = 2205
- Width = 3690
- End
- Begin VB.FileListBox fileZipName
- Height = 450
- Left = 1470
- Pattern = "*.zip"
- TabIndex = 9
- Top = 945
- Width = 4005
- End
- Begin VB.FileListBox fileExtracted
- Height = 645
- Left = 1470
- TabIndex = 8
- Top = 1470
- Width = 4005
- End
- Begin VB.TextBox txtExtractToPath
- Height = 285
- Left = 1470
- TabIndex = 2
- Text = "c:\c&c\temp"
- Top = 630
- Width = 4005
- End
- Begin VB.CommandButton btnExtract
- Caption = "&Extract Files"
- Default = -1 'True
- Height = 540
- Left = 5670
- TabIndex = 3
- Top = 210
- Width = 1380
- End
- Begin VB.TextBox txtPKPath
- Height = 285
- Left = 1470
- TabIndex = 1
- Text = "c:\zipper\pkunzip.exe"
- Top = 315
- Width = 4005
- End
- Begin VB.Label Label8
- Caption = "Text File"
- Height = 225
- Left = 105
- TabIndex = 14
- Top = 2835
- Width = 1590
- End
- Begin VB.Label Label7
- Caption = "Mission Ini:"
- Height = 225
- Left = 105
- TabIndex = 11
- Top = 2520
- Width = 1590
- End
- Begin VB.Label Label6
- Caption = "Save Game FileName:"
- Height = 225
- Left = 105
- TabIndex = 10
- Top = 2205
- Width = 1590
- End
- Begin VB.Label Label5
- Caption = "Files Extracted:"
- Height = 225
- Left = 105
- TabIndex = 7
- Top = 1470
- Width = 1275
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Extract To Path:"
- Height = 195
- Left = 105
- TabIndex = 6
- Top = 630
- Width = 1275
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Zip File:"
- Height = 195
- Left = 105
- TabIndex = 5
- Top = 945
- Width = 1290
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "PKUNZIP Path:"
- Height = 195
- Left = 105
- TabIndex = 4
- Top = 315
- Width = 1275
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub btnExtract_Click()
- Dim PKPath$, ZipPath$, ExToPath$, CommandLine$
- Dim I As Long, J As Long
- Dim Ret As Boolean
- 'Store the various user inputs into varibles
- PKPath = UCase(txtPKPath.Text)
- ZipPath = "D:\ARCHIVES\" & UCase(fileZipName.List(fileZipName.ListIndex))
- ExToPath = UCase(txtExtractToPath.Text)
- 'Delete all files in ExToPath, then we can get the unzipped name
- 'If you dont unzip to an empty directory you might get the wrong files returned
- 'This line assumes every file is okay to be deleted
- Kill ExToPath & "\*.*"
- fileExtracted.Path = ExToPath
- 'Combine the varibles and command line stings to
- 'run pkunzip as you would from dos
- ' -o -en overwrites anything thats there and extracts in name order
- 'change if needed
- CommandLine = PKPath & " -o -en " & ZipPath & " " & ExToPath
- MsgBox CommandLine
- Ret = ShellAndClose(CommandLine)
- If Ret = False Then
- MsgBox "An error occured in the shelling process"
- End If
- 'Click the get CC files
- btnGetCC.Value = True
- End Sub
- Private Sub btnGetCC_Click()
- 'Get SaveGame file
- fileExtracted.Pattern = "SaveGame.*"
- fileExtracted.Refresh
- If fileExtracted.ListCount <> 0 Then
- txtSaveGameName.Text = fileExtracted.List(0)
- txtSaveGameName.Text = "File Not Found"
- End If
- 'Get Mission.ini
- fileExtracted.Pattern = "Mission.Ini"
- fileExtracted.Refresh
- If fileExtracted.ListCount <> 0 Then
- txtMissionIni.Text = fileExtracted.List(0)
- txtMissionIni.Text = "File Not Found"
- End If
- 'Get txt and/or doc file
- fileExtracted.Pattern = "*.txt"
- fileExtracted.Refresh
- If fileExtracted.ListCount <> 0 Then
- txtTextFile.Text = fileExtracted.List(0)
- fileExtracted.Pattern = "*.doc"
- fileExtracted.Refresh
- If fileExtracted.ListCount <> 0 Then
- txtTextFile.Text = fileExtracted.List(0)
- Else
- txtTextFile.Text = "No files found"
- End If
- End If
- fileExtracted.Pattern = "*.*"
- End Sub
- Private Sub fileZipName_DblClick()
- btnExtract.Value = True
- End Sub
- Private Sub Form_Load()
- fileZipName.Path = "D:\archives"
- 'Set up file box
- fileExtracted.Pattern = "*.*"
- End Sub
-