SFTP

Frends.SFTP.RenameFile / 3.0.0

Summary

Renames a file on an SFTP server, with a choice of behaviour when the new name is taken.

Typical use — signalling completeness to the receiving side, which is the usual convention for an atomic handover over SFTP

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Source transfer options

Name Type Default Example Description
Path String /root/folder/example.txt

Full path of the target file to be renamed.

NewFileName String newName.txt

New name for the file.

RenameBehaviour RenameBehaviour

How the file rename should work if a file with the new name already exists. If Rename is selected, will append a number to the new file name e.g. renamed(2).txt

Possible values:

  • Throw: Exception is thrown.

  • Overwrite: The existing file is overwritten.

  • Rename: A number is appended to the end of the new file name.

An unhandled error has occurred. Reload 🗙