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

# 清空文件夹

## 指令说明

**描述：** 把指定的文件夹清空

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/vz87YmU8RN3LdaSE/helpcenter/commands/os/images/clearfoldercommand-01.png?fit=max&auto=format&n=vz87YmU8RN3LdaSE&q=85&s=88cea999ebd75948f578b886ff422d56" alt="清空文件夹指令参数面板" width="713" height="303" data-path="helpcenter/commands/os/images/clearfoldercommand-01.png" />

    | 参数          | 说明          |
    | ----------- | ----------- |
    | **要清空的文件夹** | 填写要清空的文件夹路径 |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/vz87YmU8RN3LdaSE/helpcenter/commands/os/images/clearfoldercommand-02.png?s=e4b8f240551b2f534816942bee1c28ba" alt="清空文件夹使用示例 - 流程搭建" width="1827" height="945" data-path="helpcenter/commands/os/images/clearfoldercommand-02.png" />

**该流程执行逻辑：**

1. 在【清空文件夹】中选择目标目录“D:\RPA文件夹”。
2. 运行指令后，目录中的文件和符合配置条件的内容被删除，但目标文件夹本身仍然保留。
3. 后续流程可以继续向该空文件夹写入新的文件。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/vz87YmU8RN3LdaSE/helpcenter/commands/os/images/clearfoldercommand-03.png?fit=max&auto=format&n=vz87YmU8RN3LdaSE&q=85&s=729079f7603055055a82892578ed219c" alt="清空文件夹使用示例 - 效果展示" width="1134" height="839" data-path="helpcenter/commands/os/images/clearfoldercommand-03.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
