# Copy files with SCP

Copy files with SCP on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

Transferetto

Small PowerShell module with FTPS/SFTP functionality

[View on GitHub](https://github.com/EvotecIT/Transferetto) [Visit Website](#) [Releases](https://github.com/EvotecIT/Transferetto/releases/tag/Transferetto-v2.0.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/Transferetto)

Stars**93**

Forks**18**

Open issues**0**

PowerShell Gallery downloads**14067470**

Release**v2.0.4**

Language: C# Updated: 2026-11-17

Curated Examples

Use Transferetto to copy files and directories with SCP.

This pattern is useful when the target system exposes SCP and you want a straightforward Linux-style copy workflow without the richer SFTP filesystem surface.

It is adapted from the source example at `Examples/Example02-BasicExampleSCP.ps1`.

## When to use this pattern

- The server exposes SCP.
- The job is mostly file or directory copy.
- You want the same SSH trust model used by the SSH management lane.

## Example

```powershell
Import-Module Transferetto

$scpClient = Connect-SCP -Server 'server.example.com' -Credential (Get-Credential)

Receive-SCPFile -ScpClient $scpClient `
    -RemotePath '/var/www/releases/current.zip' `
    -LocalPath "$PSScriptRoot\Downloads\current.zip"

Send-SCPDirectory -ScpClient $scpClient `
    -LocalPath "$PSScriptRoot\BuildOutput" `
    -RemotePath '/var/www/releases/build-output'

Disconnect-SCP -ScpClient $scpClient
```

## What this demonstrates

- opening an SCP session with the same SSH credential flow as other secure lanes
- downloading a single remote file
- uploading a full local directory tree

## Source

- [Example02-BasicExampleSCP.ps1](https://github.com/EvotecIT/Transferetto/blob/master/Examples/Example02-BasicExampleSCP.ps1)

<!-- PowerForge markdown artifact sha256:6AA53A9A07C1147C819F526ACFF4EE7322C84B5C26FFA14D081B5A29421F9BA8 -->
