# Manage SFTP folders

Manage SFTP folders 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 create, inspect, test, and remove SFTP directories from PowerShell.

This pattern is useful when a script needs to prepare, verify, and clean up remote SFTP folders instead of only moving files.

It is adapted from the source example at `Examples/Example18-SFTPDirectoryManagement.ps1`.

## When to use this pattern

- The script should create a remote directory before transfer.
- You want to verify whether the folder exists.
- Working-directory changes or cleanup are part of the task.

## Example

```powershell
Import-Module Transferetto

$sftpClient = Connect-SFTP -Server 'sftp.example.com' -Credential (Get-Credential)

New-SFTPDirectory -SftpClient $sftpClient -Path '/incoming/releases'
Test-SFTPDirectory -SftpClient $sftpClient -Path '/incoming/releases'
Get-SFTPItem -SftpClient $sftpClient -Path '/incoming'

Set-SFTPWorkingDirectory -SftpClient $sftpClient -Path '/incoming' -PassThru | Out-Null
Get-SFTPWorkingDirectory -SftpClient $sftpClient

Remove-SFTPDirectory -SftpClient $sftpClient -Path '/incoming/releases'
Disconnect-SFTP -SftpClient $sftpClient
```

## What this demonstrates

- creating and verifying a remote SFTP directory
- inspecting the parent folder contents
- changing the working directory before cleanup

## Source

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

<!-- PowerForge markdown artifact sha256:B92769B3FA02FC613076AAFBD2A244595521F7272B57EE88836ABCBCFE8E471C -->
