Differences

This shows you the differences between the selected revisions of the page.

2017-02-16 2017-10-04
scripting anchor (martin) using variable expansion in strings in powershell (martin)
Line 32: Line 32:
        foreach ($line in $lines)         foreach ($line in $lines)
        {         {
-            Write-Host ("Uploading {0} ..." -f $line)+            Write-Host "Uploading $line ..."
            $session.PutFiles($line, $remotePath).Check()             $session.PutFiles($line, $remotePath).Check()
        }         }
Line 46: Line 46:
catch [Exception] catch [Exception]
{ {
-    Write-Host ("Error: {0}" -f $_.Exception.Message)+    Write-Host "Error: $($_.Exception.Message)"
    exit 1     exit 1
} }

Last modified: by martin