Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
PrzemyslawKlys committed Oct 26, 2023
1 parent 0293e45 commit 6afcbdd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Examples/Example11-ReceiveFiles.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Import-Module .\Transferetto.psd1 -Force

Set-FTPTracing -Enable

# Connect to FTP
$Client = Connect-FTP -Server 'test.rebex.net' -Verbose -Username 'demo' -Password 'password'

Expand All @@ -14,7 +16,7 @@ foreach ($RemoteFile in $FindLatestFile) {
Receive-FTPFile -Client $Client -RemoteFile $RemoteFile -LocalPath "$PSScriptRoot\Download\$($RemoteFile.Name)" -LocalExists Overwrite -VerifyOptions Retry, None
}
# Download multiple files into directory
Receive-FTPFile -Client $Client -RemoteFile $FindLatestFile -LocalPath "$PSScriptRoot\Download" -LocalExists Overwrite -VerifyOptions Retry, None
Receive-FTPFile -Client $Client -RemoteFile $FindLatestFile -LocalPath "$PSScriptRoot\Download" -LocalExists Overwrite -VerifyOptions Retry, None | Format-Table

# Disconnect
Disconnect-FTP -Client $Client

0 comments on commit 6afcbdd

Please sign in to comment.