---
title: "匯出工作資料夾"
description: "EMILY.RPA 匯出工作資料夾模組：將工作資料夾中的檔案匯出到指定的目標資料夾，支援 %FILENAME% 變數。"
source: https://docs.emily.tips/wap/repo2dir
---

# 匯出工作資料夾

匯出工作資料夾中的檔案。其中 `FOLDER` 爲匯出的目標資料夾，點擊「**PICK**」按鈕指定檔案路徑或使用 **%FILENAME%** 變數。

![](https://docs.emily.tips/img/zh/wap-041.png)

## No-Code 編輯器

提供：「**篩選檔案後匯出**」等無程式碼指令。例如，將工作資料夾中檔名包含 `report.pdf` 的檔案匯出到桌面。

![](https://docs.emily.tips/img/zh/wap-042.png)

## Low-Code 編輯器

![](https://docs.emily.tips/img/zh/wap-043.png)

### input 輸入陣列

在 input 陣列中每個元素代表一個工作資料夾的檔案，src 為原始檔名，dst 為目標檔名。

```javascript
// 印出工作資料夾中每個檔案的名稱
input.forEach((file) => console.log(file.src))
```

### output 輸出陣列

在 output 陣列中每個元素物件代表工作資料夾欲匯出的檔案，src 為原始檔名，dst 為目標檔名。

```javascript
// 將工作資料夾中所有檔案匯出，並在每個檔名前端加上一個固定字串 'auto'
input.forEach((file) => {
  output.push({src: file.src, dst: 'auto-'+file.src})
})
```
