Documentation
¶
Overview ¶
Package extract implements 'rclone archive extract'
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cobra.Command{ Use: "extract [flags] <source> <destination>", Short: `Extract archives from source to destination.`, Long: strings.ReplaceAll(` Extract the archive contents to a destination directory auto detecting the format. See [rclone archive create](/commands/rclone_archive_create/) for the archive formats supported. For example on this archive: ||| $ rclone archive list --long remote:archive.zip 6 2025-10-30 09:46:23.000000000 file.txt 0 2025-10-30 09:46:57.000000000 dir/ 4 2025-10-30 09:46:57.000000000 dir/bye.txt ||| You can run extract like this ||| $ rclone archive extract remote:archive.zip remote:extracted ||| Which gives this result ||| $ rclone tree remote:extracted / ├── dir │ └── bye.txt └── file.txt ||| The source or destination or both can be local or remote. Filters can be used to only extract certain files: ||| $ rclone archive extract archive.zip partial --include "bye.*" $ rclone tree partial / └── dir └── bye.txt ||| The [archive backend](/archive/) can also be used to extract files. It can be used to read only mount archives also but it supports a different set of archive formats to the archive commands. `, "|", "`"), Annotations: map[string]string{ "versionIntroduced": "v1.72", }, RunE: func(command *cobra.Command, args []string) error { cmd.CheckArgs(2, 2, command, args) src, srcFile := cmd.NewFsFile(args[0]) dst, dstFile := cmd.NewFsFile(args[1]) cmd.Run(false, false, command, func() error { return ArchiveExtract(context.Background(), dst, dstFile, src, srcFile) }) return nil }, }
Command - extract
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.