Differences

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

2015-08-25 2015-10-15
correcting output file name (martin) $sessionUrl not to conflict with $session (martin)
Line 10: Line 10:
<code powershell> <code powershell>
param ( param (
-    $session = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/",+    $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/",
    $remotePath = "/path",     $remotePath = "/path",
    $outFile = "listing.csv"     $outFile = "listing.csv"
Line 22: Line 22:
    # Setup session options     # Setup session options
    $sessionOptions = New-Object WinSCP.SessionOptions     $sessionOptions = New-Object WinSCP.SessionOptions
-    $sessionOptions.ParseUrl($session)+    $sessionOptions.ParseUrl($sessionUrl)
    try     try

Last modified: by martin