---
title: "終端機命令列"
description: "EMILY.RPA 終端機命令列模組：執行本機終端機命令列，可用指令視本機作業系統而定。"
source: https://docs.emily.tips/wap/commandline
---

# 終端機命令列

執行本機終端機命令列，指令視本機作業系統而定。

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

與本機的終端機或命令列模式相同，執行結果輸出到工作資料夾內 output.txt 檔案，以 Mac 或 Linux 電腦為例：

```bash
ls -al
```

產生的 output.txt 內容如下：
```
total 56
drwxr-xr-x 7   jt.strad staff 224   Jun 6 10:56 .
drwx------ 328 jt.strad staff 10496 Jun 6 09:35 ..
-rw-r--r--@ 1  jt.strad staff 6148  Jun 6 09:36 .DS_Store
-rw-r--r-- 1   jt.strad staff 302   Jun 6 09:36 output.csv
-rw-r--r-- 1   jt.strad staff 531   Jun 6 10:56 output.txt
-rw-r--r-- 1   jt.strad staff 8090  Jun 6 10:49 result.png
-rw-r--r-- 1   jt.strad staff 15    Jun 6 10:48 slideshow.txt
```

**%FILENAME% 變數**也可以用在命令列中：

```shell
ls -al %dir%
```
