> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# zipExtract

> 既存の圧縮アーカイブから、ディスク上の指定された場所にファイルとフォルダを展開します。

export const siteNameShort = "Arc";

既存の圧縮アーカイブからファイルとフォルダを展開します。

## 必要なパラメータ

* **type**：アーカイブの種類。使用できる値はZIP、TAR、JAR、およびGZIP です。デフォルトはZIP です。
* **archive**：展開するアーカイブのディスク上のパス（ファイル名を含む）。
* **extractto**：展開したファイルとフォルダを配置するディスク上のパス。

## オプションのパラメータ

* **excludefile#**：アーカイブから除外するファイルの配列。例えば、2つのファイルを除外するには、それらのファイルへのパスを`excludefile#1` および `excludefile#2` に設定します。{siteNameShort}Script の配列属性の詳細については、[ArcScript 入門](./operations)を参照してください。
* **path#**：アーカイブ内で展開するパスの配列。各パスはアーカイブのルートからの相対パスで、スラッシュで終わる必要があります（例：`<arc:set attr="zip.path" value="zipthis/" />`）。これが設定されていない場合は、アーカイブ内のすべてのパスが展開されます。

## アウトプット属性

* **zip:result**：オペレーションが成功した場合、SUCCESS が返されます。

## 例

この例では、`/home/mydata.zip` にあるzip アーカイブから`zipthis` フォルダのみを展開し、ディスク上の`/tmp/foo` ディレクトリに配置します。アーカイブ内の`.txt` 拡張子を持つすべてのファイルは無視され、展開されません。

```xml theme={null}
<!-- Creating the input item and the necessary attributes -->
<arc:set attr="zip.archive" value="/home/mydata.zip" />
<arc:set attr="zip.type" value="ZIP" />
<arc:set attr="zip.extractto" value="/tmp/foo" />
<arc:set attr="zip.excludefile#" value="*.txt" />
<arc:set attr="zip.path#" value="zipthis/" />

<arc:call op="zipExtract" in="zip">
  <!-- Optional logging step to log the status of the operation to the application log. -->
  <arc:set attr="_log.info" value="The zipExtract operation for connector [ConnectorId] has finished with a status of [results.zip:result]." />
</arc:call>
```
