Project

Transferetto

Small PowerShell module with FTPS/SFTP functionality

Stars66
Forks16
Open issues10
PowerShell Gallery downloads13676958
Releasev1.0.0
Language: C# Updated: 2026-06-05T18:34:45.0000000+00:00

Curated Examples

Synchronize FTP and SFTP directories

Plan, preview, update, and mirror directory trees with Transferetto sync cmdlets.

Use synchronization when a folder transfer should compare both sides before acting. The sync cmdlets can preview planned work, update only missing or changed files, mirror-delete extra destination items, filter paths, and choose how files are compared.

Example

Import-Module Transferetto

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

Sync-SFTPDirectory -SftpClient $sftpClient `
    -LocalPath "$PSScriptRoot\Upload" `
    -RemotePath '/incoming/releases' `
    -Mode Mirror `
    -Include '*.zip', '*.json' `
    -Exclude 'archive/*' `
    -DryRun

Sync-SFTPDirectory -SftpClient $sftpClient `
    -LocalPath "$PSScriptRoot\Upload" `
    -RemotePath '/incoming/releases' `
    -Mode Mirror `
    -Include '*.zip', '*.json' `
    -Exclude 'archive/*' `
    -ShowProgress

Disconnect-SFTP -SftpClient $sftpClient

Useful options

  • -Direction Upload treats the local folder as source.
  • -Direction Download treats the remote folder as source.
  • -Mode Update leaves extra destination files alone.
  • -Mode Mirror removes destination files and folders that are not in the source.
  • -Comparison Size, -Comparison LastWriteTime, and -Comparison SizeOrLastWriteTime control change detection.
  • -DryRun returns the planned actions without changing local or remote files.

Source