--- title: "copy" slug: "cli-archivestorage-copy" updated: 2026-10-08T09:46:14Z published: 2026-10-08T09:46:14Z canonical: "cli.ncloud-docs.com/cli-archivestorage-copy" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # copy Classic/VPC環境で利用できます。 オブジェクトを新しい場所にコピーします。対象の保存先を指定しなければ、オブジェクトのメタデータのみが変更されます。 ## 構文 `copy`構文は次の通りです。 ``` swift copy \ \ \ [--destination ] \ [--fresh-metadata] \ [--meta ] \ [--header ] ``` ## オプション `copy`の実行時に指定できるオプションについて説明します。 ### 必須オプション `copy`の必須オプションです。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `<container>` | String | Required | コンテナ名 | | `<object>` | List | Required | オブジェクト名 - スペースで区切って複数入力可能 | ### 任意オプション `copy`の任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。 | オプション | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `--destination` | String | Optional | コピー先のコンテナとオブジェクト名 - `/container/object`形式で入力 - オブジェクト名を省略すると、コピー元の名前と同じ名前を使用 - 複数のオブジェクトをコピーする際、オブジェクト名まで指定するとエラー | | `--fresh-metadata` | Boolean | Optional | 既存のメタデータを除外してコピー - 未入力の場合、既存のメタデータは保持または追加 | | `--meta` | String | Optional | メタデータ項目 - `name:value`形式で入力 | | `--header` | String | Optional | リクエストで使用するユーザー定義ヘッダ - `header:value`形式で入力 | ### 共通オプション `swift`コマンドで共通して使用するオプションについては、[Archive Storageのオプション](/docs/ja/guide-archivestorage#%EC%98%B5%EC%85%98)をご参照ください。 ## 例 コマンドを実行すると、コピー元のオブジェクトとコピー先が出力されます。 ### コマンド コマンドの例は次の通りです。 ``` swift copy test-container-01 sample.txt \ --destination /test-container-01/copied.txt ``` ### 出力 出力の例は次の通りです。 ``` created container test-container-01 test-container-01/sample.txt copied to /test-container-01/copied.txt ```