Skip to main content
Version: Next

FileMoveActivity

Category: File Operations Namespace: CMS.Plugin.FlowManagement.Domain.FlowBusiness.Activitys Base Class: ActionActivity Module: FlowManagement.Domain

Overview​

FileMoveActivity (Move File) is a node used to move files within a process. It inherits from ActionActivity and supports moving files from a specified path to a target path, with an option to overwrite existing files.

Business Scenarios​

Applicable Scenarios​

  • File Archiving: Move completed files to an archive directory.
  • File Organization: Move files to different directories based on rules.
  • Data Migration: Migrate data files to a new location.
  • Cleanup Operations: Move temporary files to a deletion directory.

Configuration Description​

Basic Configuration​

Property NameTypeRequiredDefaultDescription
FilePathstringYes-Source file path
FilePathForMovestringYes-Target path
OverWriteboolNotrueWhether to overwrite existing files

Usage Examples​

Basic Example​

{
"Type": "FileMoveActivity",
"Name": "Archive Data File",
"Alias": "ArchiveData",
"FilePath": "C:\\Data\\current.csv",
"FilePathForMove": "C:\\Archive\\2024\\data.csv",
"OverWrite": true
}

Notes​

  • ⚠️ Source file and target path cannot be the same.
  • ⚠️ If the source file does not exist, a warning is recorded and the operation is skipped.
  • ⚠️ The source file will no longer exist after moving.
  • 💡 Ensure the target directory exists, otherwise the move will fail.

Update History​

DateVersionDescription
2025-11-281.0Initial version

Last updated: 2025-11-28