Differences
This shows you the differences between the selected revisions of the page.
| 2012-09-24 | 2013-04-30 | ||
| 5.1 is stable (martin) | Using camel case for PowerShell built-in constants as MS does (martin) | ||
| Line 230: | Line 230: | ||
| function FileTransferred | function FileTransferred | ||
| { | { | ||
| - | if ($_.Error -eq $null) | + | if ($_.Error -eq $Null) |
| { | { | ||
| Write-Host ("Upload of {0} succeeded" -f $_.FileName) | Write-Host ("Upload of {0} succeeded" -f $_.FileName) | ||
| Line 239: | Line 239: | ||
| } | } | ||
| - | if ($_.Chmod -ne $null) | + | if ($_.Chmod -ne $Null) |
| { | { | ||
| - | if ($_.Chmod.Error -eq $null) | + | if ($_.Chmod.Error -eq $Null) |
| { | { | ||
| Write-Host ("Permisions of {0} set to {1}" -f $_.Chmod.FileName, $_.Chmod.FilePermissions) | Write-Host ("Permisions of {0} set to {1}" -f $_.Chmod.FileName, $_.Chmod.FilePermissions) | ||
| Line 256: | Line 256: | ||
| } | } | ||
| - | if ($_.Touch -ne $null) | + | if ($_.Touch -ne $Null) |
| { | { | ||
| - | if ($_.Touch.Error -eq $null) | + | if ($_.Touch.Error -eq $Null) |
| { | { | ||
| Write-Host ("Timestamp of {0} set to {1}" -f $_.Touch.FileName, $_.Touch.LastWriteTime) | Write-Host ("Timestamp of {0} set to {1}" -f $_.Touch.FileName, $_.Touch.LastWriteTime) | ||
| Line 295: | Line 295: | ||
| $session.Open($sessionOptions) | $session.Open($sessionOptions) | ||
| $synchronizationResult = $session.SynchronizeDirectories( | $synchronizationResult = $session.SynchronizeDirectories( | ||
| - | [WinSCP.SynchronizationMode]::Remote, "d:\www", "/home/martin/public_html", $false) | + | [WinSCP.SynchronizationMode]::Remote, "d:\www", "/home/martin/public_html", $False) |
| # Throw on any error | # Throw on any error | ||