SFTP

Frends.SFTP.MoveFile / 3.0.0

Summary

Moves files between directories on an SFTP server, creating the target directory if needed and deciding what to do about an existing file.

Typical use — server-side staging, such as moving collected files into an archive directory without downloading them

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Source transfer options.

Name Type Default Example Description
Directory String / /source.

Source directory.

Pattern String *.xml *.xml.

Pattern to match for files. The file mask uses regular expressions, but for convenience, it has special handling for * and ? wildcards.

TargetDirectory String / /destination.

Target directory where the found files should be copied to.

IfTargetFileExists FileExistsOperation Throw FileExistsOperation.Throw.

Operation for if the transferred file exists in destination.

Possible values:

  • Throw: Exception is thrown.

  • Rename: Transferred file will be renamed by appending a number to the end.

  • Overwrite: Transferred file will overwrite the existing file.

CreateTargetDirectories Boolean True true.

Enables the Task to create the target directories.

FileEncoding FileEncoding ANSI FileEncoding.ANSI.

Encoding for the read content. Select Other to specify an encoding by name.

Possible values:

  • UTF8: UTF-8 encoding.

  • ANSI: ANSI encoding.

  • ASCII: ASCII encoding.

  • WINDOWS1252: Windows-1252 encoding.

  • Other: Other enables users to add other encoding options as string.

EnableBom Boolean False true.

Additional option for UTF-8 encoding to enable bom.

EncodingInString String – utf-8.

File encoding to be used. Unicode encodings are not supported; use a code-page encoding. A partial list of possible encodings: https://en.wikipedia.org/wiki/Windows_code_page#List.

An unhandled error has occurred. Reload 🗙
Reconnecting… Connection lost.