SFTP

Frends.SFTP.MoveFile / 2.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.5 and newer
Agent
Crossplatform
Target framework
net6.0

Source transfer options

Name Type Default Example Description
Directory String / /source

Source directory.

Pattern String *.xml /destination

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. By selecting 'Other' you can use any encoding.

Possible values:

  • UTF8: Encoding for the read content. By selecting 'Other' you can use any encoding.

  • ANSI: Encoding for the read content. By selecting 'Other' you can use any encoding.

  • ASCII: Encoding for the read content. By selecting 'Other' you can use any encoding.

  • WINDOWS1252: Encoding for the read content. By selecting 'Other' you can use any 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. Encoding don't support any unicode encoding. It only support the code page encodings. A partial list of possible encodings: https://en.wikipedia.org/wiki/Windows_code_page#List.

An unhandled error has occurred. Reload 🗙