Skip to content

How to zip whole directory recursively? #10

Description

@RobsonMi

Hello,

lovely module but I can't figure out how to zip whole directory including all files and subdirectories with their files.

Say I have folder C:\abc I want to zip.

When I try to use C:\abc as from and files = [""] it throws absolute path error. When files array is full of relative paths to files inside the folder like ["directory/test.txt", "index.js"] then it will only ever pack one last item in the array and ignore all else. If I specify from as one level above C:\ and provide files = ["abc"] it will pack this directory recursively but then inside the zip I have a top level folder abc that I don't want.

What is the correct way to zip say directory C:\abc with all internal files and structure into a zip C:\abc.zip?

Any help is greatly appreciated :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions