Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 53283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:02:21+00:00 2026-05-10T17:02:21+00:00

Is there a way to programmatically create a compressed folder in Windows? I can’t

  • 0

Is there a way to programmatically create a compressed folder in Windows? I can’t see a way to do this using the FileSystemObject (although there is the ‘Compressed’ attribute).

I’ve seen zip dll’s but I’d prefer to avoid having to re-distribute a dll if possible. Windows XP natively supports compressed folders after all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:02:22+00:00Added an answer on May 10, 2026 at 5:02 pm

    Have a look at the following links:

    http://www.rondebruin.nl/windowsxpzip.htm

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1383147&SiteID=1

    Stripping the important parts from the first link example may prove to be sufficient.

    Sub NewZip(sPath) 'Create empty Zip File 'Changed by keepITcool Dec-12-2005     If Len(Dir(sPath)) > 0 Then Kill sPath     Open sPath For Output As #1     Print #1, Chr$(80) & Chr$(75) & Chr$(5) & Chr$(6) & String(18, 0)     Close #1 End Sub  Function Split97(sStr As Variant, sdelim As String) As Variant 'Tom Ogilvy     Split97 = Evaluate('{''' & _                        Application.Substitute(sStr, sdelim, ''',''') & '''}') End Function  Sub Zip_File_Or_Files()     Dim strDate As String, DefPath As String, sFName As String     Dim oApp As Object, iCtr As Long, I As Integer     Dim FName, vArr, FileNameZip      DefPath = Application.DefaultFilePath     If Right(DefPath, 1) <> '\' Then         DefPath = DefPath & '\'     End If      strDate = Format(Now, ' dd-mmm-yy h-mm-ss')     FileNameZip = DefPath & 'MyFilesZip ' & strDate & '.zip'      'Browse to the file(s), use the Ctrl key to select more files     FName = Application.GetOpenFilename(filefilter:='Excel Files (*.xl*), *.xl*', _                     MultiSelect:=True, Title:='Select the files you want to zip')     If IsArray(FName) = False Then         'do nothing     Else         'Create empty Zip File         NewZip (FileNameZip)         Set oApp = CreateObject('Shell.Application')         I = 0         For iCtr = LBound(FName) To UBound(FName)             vArr = Split97(FName(iCtr), '\')             sFName = vArr(UBound(vArr))             If bIsBookOpen(sFName) Then                 MsgBox 'You can't zip a file that is open!' & vbLf & _                        'Please close it and try again: ' & FName(iCtr)             Else                 'Copy the file to the compressed folder                 I = I + 1                 oApp.Namespace(FileNameZip).CopyHere FName(iCtr)                  'Keep script waiting until Compressing is done                 On Error Resume Next                 Do Until oApp.Namespace(FileNameZip).items.Count = I                     Application.Wait (Now + TimeValue('0:00:01'))                 Loop                 On Error GoTo 0             End If         Next iCtr          MsgBox 'You find the zipfile here: ' & FileNameZip     End If End Sub 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 77k
  • Answers 77k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer the solution I came up with is: SqlQuery q =… May 11, 2026 at 3:35 pm
  • added an answer No, checking to see if the email already exists is… May 11, 2026 at 3:35 pm
  • added an answer Removing unnecessary whitespace will reduce the loading time of your… May 11, 2026 at 3:35 pm

Related Questions

Is there a way to programmatically create a compressed folder in Windows? I can't
Has anyone found a way to save a FlowDocument as BAML or other compressed
Is there a way to programmatically create PowerPoint presentations? If possible, I'd like to
On linux, it's possible to create a tun interface using a tun driver which
My project that I am working on is almost finished. I am loading a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.