creates a compressed archive in the current directory from a file or directory specified by source.
creates a compressed archive in the directory or file specified by path.
- 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 , , , , , , , , and .
- CreateArchive[source] creates an archive file in the current working 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 a destination directory is given, CreateArchive automatically chooses a suitable file name for the archive.
- CreateArchive returns the full file name of the archive it created, and $Failed if it cannot be created.
- The file archive to be created must not already exist.
- CreateArchive takes an option CreateIntermediateDirectories to specify whether intermediate directories should be created. The default setting is True.
- CreateArchive does not delete the source file or directory.
New in 8