> ## 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> 
```
