Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Posts
    22

    Red face Unanswered: How to Zip Folder

    Dear,
    I need zip folder but still error,have you sulution.This script I have.

    Private Sub ZipFolder_Click()


    Dim folder_backup As String, file_zip As String
    'BackUp Folder
    folder_backup = "E:\DATABASE\FTP\Test"
    'Chech Folder Value, if Nothing Exit
    If Dir("E:\DATABASE\FTP\Test") = "" Then
    MsgBox "Nothing in Folder " + ("E:\DATABASE\FTP\Test") + " Please Check Again Folder", vbOKOnly + vbExclamation, "Zip Folder Test"
    Exit Sub
    'Chech WinZip Application
    Else
    If IsWinNT = True Then
    file_zip = "C:\Program Files\WinRAR\WinRAR.exe"
    If Dir(file_zip) = "" Then
    'If WinZip Application doesn't Exist Show MsgBox and Exit
    MsgBox "Win Zip Application doesn't Exit" + Chr(13) + "Installation Requerid" + Chr(13), vbExclamation + vbOKOnly, "Zip Folder Test"
    Exit Sub
    'If Win Zip Application does Exist then Compress Folder
    Else
    Shell file_zip + " -a " + """" + ("E:\DATABASE\FTP\Test") + file_backup + ".zip" + """" + " " + """" + "E:\DATABASE\FTP\Test" + """", vbNormalFocus + vbMaximizedFocus
    MsgBox "BackUp Folder " + "E:\DATABASE\FTP\Test" + ".zip" + " Successful", vbOKOnly + vbInformation, "INFORMATION"
    End If
    End If
    End If
    End Sub

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ...and pray enlighten us.. what error message do you get?
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •