RenameFile
Renames a file on a remote SMB share.
Task version: 2.2.0
Required Frends version: 5.7+
Required .NET version: 8.0
Compatible Agents: Crossplatform
Task Parameters
Path : String
Path to the file to be renamed.
Default: -
Example: folder\oldfile.txt
NewFileName : String
The new filename including extension.
Default: -
Example: newfile.txt
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
RenameBehaviour : RenameBehaviour
How the file write should work if a file with the new name already exists
Possible values:
Rename: How the file write should work if a file with the new name already existsOverwrite: How the file write should work if a file with the new name already existsThrow: How the file write should work if a file with the new name already exists
Default: 2
Example: RenameBehaviour.Throw
ThrowErrorOnFailure : Boolean
Whether to throw an error on failure.
Default: True
Example: false
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
NewFilePath : PathString
Full path of the file after the rename operation.
Example: Folder/SubFolder/document.txt
Error : Error
Error that occurred during task execution.
Example: object { string Message, Exception AdditionalInfo }
Task Changelog
Changelog for Task Frends.Smb.RenameFile.
[2.2.0] - 2026-06-26
Changed
Username parsing: now accepts a username without a domain instead of throwing an error.
[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-07
Added
Initial implementation
Last updated
Was this helpful?

