Differences

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

2014-12-03 2014-12-03
parameterised powershell script (martin) parameterised powershell script (martin)
Line 567: Line 567:
<code powershell> <code powershell>
 +param (
 +    $localPath = "C:\upload\*",
 +    $remotePath = "/home/user/",
 +    $backupPath = "C:\backup\"
 +)
 +
try try
{ {
Line 587: Line 593:
        $session.Open($sessionOptions)         $session.Open($sessionOptions)
-        $localPath = "C:\upload\*" 
-        $remotePath = "/home/user/" 
-        $backupPath = "C:\backup\" 
- 
        # Upload files, collect results         # Upload files, collect results
        $transferResult = $session.PutFiles($localPath, $remotePath)         $transferResult = $session.PutFiles($localPath, $remotePath)

Last modified: by martin