Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
CreateArchive
  • See Also
    • ExtractArchive
    • Compress
    • Import
    • Export
    • FileSystemMap
    • CopyDirectory

    • Formats
    • ZIP
    • TAR
    • GZIP
    • BZIP2
    • ZSTD
    • ISO
  • Related Guides
    • Importing and Exporting
    • Compression and Archive Formats
    • File Operations
    • See Also
      • ExtractArchive
      • Compress
      • Import
      • Export
      • FileSystemMap
      • CopyDirectory

      • Formats
      • ZIP
      • TAR
      • GZIP
      • BZIP2
      • ZSTD
      • ISO
    • Related Guides
      • Importing and Exporting
      • Compression and Archive Formats
      • File Operations

CreateArchive[source]

creates a compressed archive in the current directory from source.

CreateArchive[source,path]

creates a compressed archive in the directory or file specified by path.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Source  
Path  
Format  
Options  
CompressionLevel  
CreateIntermediateDirectories  
OverwriteTarget  
Applications  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ExtractArchive
    • Compress
    • Import
    • Export
    • FileSystemMap
    • CopyDirectory

    • Formats
    • ZIP
    • TAR
    • GZIP
    • BZIP2
    • ZSTD
    • ISO
  • Related Guides
    • Importing and Exporting
    • Compression and Archive Formats
    • File Operations
    • See Also
      • ExtractArchive
      • Compress
      • Import
      • Export
      • FileSystemMap
      • CopyDirectory

      • Formats
      • ZIP
      • TAR
      • GZIP
      • BZIP2
      • ZSTD
      • ISO
    • Related Guides
      • Importing and Exporting
      • Compression and Archive Formats
      • File Operations

CreateArchive

CreateArchive[source]

creates a compressed archive in the current directory from source.

CreateArchive[source,path]

creates a compressed archive in the directory or file specified by path.

Details and Options

  • CreateArchive infers the compression format from the file extension of the archive name. If no extension is given, CreateArchive uses ZIP compression.
  • Possible file extensions include ".zip", ".gz", ".tar.gz", ".bz2", ".tar.bz2", ".tbz", ".tbz2", ".tb2", ".tgz" and ".zst".
  • The source specification can be any of the following:
  • File["source"] or "source"explicit file name or a directory
    URL["url"] or "url"HTTP, HTTPS or FTP URL
    {source1,source2,…}a list of files or directories
    <|"file1"source1,"file2"source2,…|>rename each file or directory to filen
  • By default, CreateArchive creates an archive in the current working directory given by Directory[].
  • The source as well as the destination path can be a relative or absolute directory or file specification.
  • Relative directory or file paths are taken to be relative to the current working directory.
  • If path specifies a directory, a suitable file name for the archive is automatically chosen.
  • CreateArchive returns the full file name of the archive it created, and $Failed if it cannot be created.
  • The following options can be given:
  • CompressionLevel Automaticthe compression level to use
    CreateIntermediateDirectories Truewhether to create intermediate directories
    OverwriteTarget Falsewhether to overwrite an existing archive
  • Possible settings for OverwriteTarget include:
  • Falsedo not overwrite an existing file
    Trueoverwrite an existing file
    "KeepBoth"keep the existing file, automatically choosing a name for the new file
  • CreateArchive with URL sources accepts the following URLDownload options:
  • AuthenticationNoneauthentication information to send
    CookieFunctionAutomaticfunction to apply to each cookie received
    ConnectionSettingsAutomaticspeed and other settings for the connection
    FollowRedirectsTruewhether to follow HTTP redirects
    InteractiveTruewhether to allow interactive authentication dialogs
    TimeConstraintInfinitytime to wait for a response
    VerifySecurityCertificatesTruewhether to verify SSL security certificates
  • CreateArchive does not delete the source files or directories.

Examples

open all close all

Basic Examples  (3)

Create a ZIP archive from the ExampleData directory:

Delete the resulting archive:

Create a ZIP file from a list of files from the ExampleData directory:

Import the list of file names included in the ZIP file:

Delete the resulting archive:

Specify an explicit destination directory:

Delete the resulting archive:

Scope  (11)

Source  (5)

Create a ZIP archive from a single file:

Delete the resulting archive:

Create a ZIP archive from a directory:

Delete the resulting archive:

Gather a list of files to archive:

Create a ZIP archive from the chosen files:

Delete the resulting archive:

Specify names for each file or directory inside the archive:

Import the list of file names included in the ZIP file:

Delete the resulting archive:

Create a ZIP archive using both remote and local files:

Import the list of file names included in the ZIP file:

Delete the resulting archive:

Path  (3)

If no destination is specified, the archive is placed in the path given by Directory[]:

Delete the resulting archive:

Specify an explicit destination directory:

Delete the resulting archive:

Specify an explicit archive name:

Delete the resulting archive:

Format  (3)

By default, a ZIP file is created:

Delete the resulting archive:

If a destination is specified, the archive format is inferred from the extension of the destination.

Create a .gz file:

Delete the resulting archive:

Create an explicitly named .tar.bz2 archive in a specific directory:

Delete the resulting archive:

Options  (4)

CompressionLevel  (1)

Check file size before compression:

Some compression is performed by default:

Delete the resulting archives:

Specify that no compression should be used:

Delete the resulting archives:

Specify that maximal compression should be used:

Delete the resulting archive:

CreateIntermediateDirectories  (2)

Prevent creation of intermediate directories to the destination path:

Intermediate directories are created on the destination path by default:

Delete the created directory:

OverwriteTarget  (1)

Create a GZIP compressed file:

Files are not overwritten by default:

Use OverwriteTargetTrue to overwrite existing files:

Delete the resulting archive:

Applications  (1)

Use SendMail to send a directory with maximal file compression:

Delete the resulting archive:

Properties & Relations  (1)

CreateArchive constructs an archive from files and directories already on the file system:

Export can be used to create an archive from expressions in the Wolfram Language:

Delete the resulting archives:

Possible Issues  (1)

GZIP and BZIP2 only support compression of a single file:

See Also

ExtractArchive  Compress  Import  Export  FileSystemMap  CopyDirectory

Formats: ZIP  TAR  GZIP  BZIP2  ZSTD  ISO

Related Guides

    ▪
  • Importing and Exporting
  • ▪
  • Compression and Archive Formats
  • ▪
  • File Operations

History

Introduced in 2010 (8.0) | Updated in 2017 (11.1) ▪ 2020 (12.1) ▪ 2020 (12.2)

Wolfram Research (2010), CreateArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateArchive.html (updated 2020).

Text

Wolfram Research (2010), CreateArchive, Wolfram Language function, https://reference.wolfram.com/language/ref/CreateArchive.html (updated 2020).

CMS

Wolfram Language. 2010. "CreateArchive." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/CreateArchive.html.

APA

Wolfram Language. (2010). CreateArchive. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CreateArchive.html

BibTeX

@misc{reference.wolfram_2025_createarchive, author="Wolfram Research", title="{CreateArchive}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/CreateArchive.html}", note=[Accessed: 01-May-2026]}

BibLaTeX

@online{reference.wolfram_2025_createarchive, organization={Wolfram Research}, title={CreateArchive}, year={2020}, url={https://reference.wolfram.com/language/ref/CreateArchive.html}, note=[Accessed: 01-May-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English