Differences
This shows you the differences between the selected revisions of the page.
2017-08-18 | 2017-10-04 | ||
fixing syntax (martin) | using variable expansion in strings in powershell (martin) | ||
Line 82: | Line 82: | ||
if ($e.Error -eq $Null) | if ($e.Error -eq $Null) | ||
{ | { | ||
- | Write-Host ("Transfer of {0} succeeded" -f $e.FileName) | + | Write-Host "Transfer of $($e.FileName) succeeded" |
} | } | ||
else | else | ||
{ | { | ||
- | Write-Host ("Transfer of {0} failed: {1}" -f $e.FileName, $e.Error) | + | Write-Host "Transfer of $($e.FileName) failed: $($e.Error)" |
} | } | ||
} | } | ||
Line 159: | Line 159: | ||
foreach ($transfer in $transferResult.Transfers) | foreach ($transfer in $transferResult.Transfers) | ||
{ | { | ||
- | Write-Host ("Upload of {0} succeeded" -f $transfer.FileName) | + | Write-Host "Upload of $($transfer.FileName) succeeded" |
} | } | ||
} | } | ||
Line 172: | Line 172: | ||
catch [Exception] | catch [Exception] | ||
{ | { | ||
- | Write-Host ("Error: {0}" -f $_.Exception.Message) | + | Write-Host "Error: $($_.Exception.Message)" |
exit 1 | exit 1 | ||
} | } |