MoveFiles
Moves files between directories on SMB share.
Task version: 2.2.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
SourcePath : String
Source path relative to the share where files will be moved from.
Can be a directory path or a specific file path.
Default: -
Example: documents/reports
TargetPath : String
Target path relative to the share where files will be moved to.
Must be a directory path.
Default: -
Example: backup/reports
Server : String
SMB server address or hostname.
Default: -
Example: 127.0.0.1
Share : String
SMB share name to connect to.
Default: -
Example: testshare
Username : String
Username for SMB authentication.
This needs to be of format domain\username
Default: -
Example: WORKGROUP\Administrator
🗝Password : String
Password for the SMB credentials.
Default: -
Example: Password123
OperatingSystem : Os
Defines the operating system of the SMB server.
Options used to determine correct path separator to use.
Possible values:
Windows: Defines the operating system of the SMB server.
Options used to determine correct path separator to use.
Linux: Defines the operating system of the SMB server.
Options used to determine correct path separator to use.
Default: 2
Example: Linux
CreateTargetDirectories : Boolean
If true, creates the target directory and any necessary parent directories if they don't exist.
Default: True
Example: true
IfTargetFileExists : FileExistsAction
Specifies the action to take when a file with the same name already exists in the target location.
Possible values:
Throw: Specifies the action to take when a file with the same name already exists in the target location.Overwrite: Specifies the action to take when a file with the same name already exists in the target location.Rename: Specifies the action to take when a file with the same name already exists in the target location.
Default: 0
Example: Throw
PreserveDirectoryStructure : Boolean
If true, recreates the source directory structure in the target location.
If false, all files are moved directly to the target directory without preserving subdirectories.
Default: True
Example: true
Recursive : Boolean
Search for files recursively in subdirectories. Default is true.
Default: True
Example: true
PatternMatchingMode : PatternMatchingMode
Define how pattern matching will work.
Possible values:
Wildcards: Define how pattern matching will work.Regex: Define how pattern matching will work.
Default: 2
Example: Regex
Pattern : String
Define how pattern matching will work.
Default: -
Example: Regex
ContinueOnFailure : Boolean
When enabled, the task continues moving remaining files even if individual file operations fail.
Successfully moved files are returned in Files with Success = true. Failed files
are reported in Error.FileFailures with the reason for each failure.
Even if some files fail, the task will not throw regardless of the ThrowErrorOnFailure setting.
Default: False
Example: false
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: true
ErrorMessageOnFailure : String
Overrides the error message on failure.
Default: -
Example: Custom error message
Task Result
Success : Boolean
Indicates if the task completed successfully.
Example: true
Files : List<FileItem>
List of files that were successfully moved, including their source and target paths.
Example: [{SourcePath: "documents\report.txt", TargetPath: "archive\report.txt"}]
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Task Changelog
Changelog for Task Frends.Smb.MoveFiles.
[2.2.0] - 2026-05-20
Added
Added ContinueOnFailure as a new option � allows the operation to proceed when individual file copies fail, collecting errors in a failures list instead of throwing immediately
[2.1.0] - 2026-04-23
Fixed
Input parameters treated as normal string instead of PathString type.
[2.0.0] - 2026-04-08
Added
New connection parameters that defined what servers Operating System.
[Breaking Change] Introduce PathString type that will represent paths with OS specific separators.
[1.0.0] - 2025-11-12
Added
Initial implementation
Last updated
Was this helpful?

