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

# fileMove

> 将文件从一个位置移动到另一个位置，并可选择覆盖现有目标。

将文件或目录移动到指定的路径。

## 必需的参数

* **source**：要移动的文件（包括文件名）或目录的路径。
* **目的地**：文件或目录应移动到的文件路径（包括文件名）或目录。

## 可选的参数

* **force**：控制操作是否在目标路径中创建丢失的目录。 允许的值为`true`和`false`。 默认值为`true`。

## 输出属性

* **file:source**: 源文件或目录的完整路径。
* **file:destination**: 源文件或目录的完整路径。

## 示例

```xml theme={null}
<!-- Creating the input item with the associated source and destination attributes -->
<arc:set attr="input.source" value="/tmp/source/moveme.xml" />
<arc:set attr="input.destination" value="/tmp/destination/moveme.xml" />

<!-- Calling fileMove and passing in the input item -->
<arc:call op="fileMove" item="input">
  <!-- Optional: Logging information about the moved file to the application log -->
  <arc:set attr="_log.info" value="The file [input.file:source], was moved to [input.file:destination]"/>  
</arc:call> 
```
