Differences
This shows you the differences between the selected revisions of the page.
2016-09-06 | 2016-10-12 | ||
scripting (martin) | explicit value to switch parameter argument for compatibility with PowerShell 2 (martin) | ||
Line 20: | Line 20: | ||
# @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -localPath "%LocalPath%" -remotePath "%RemotePath%" %Delete% %Beep% %ContinueOnError% -interval "%Interval%" -pause -sessionLogPath "%SessionLogPath%" | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" -sessionUrl "!S" -localPath "%LocalPath%" -remotePath "%RemotePath%" %Delete% %Beep% %ContinueOnError% -interval "%Interval%" -pause -sessionLogPath "%SessionLogPath%" | ||
# @description Periodically scans for changes in a remote directory and reflects them on a local directory | # @description Periodically scans for changes in a remote directory and reflects them on a local directory | ||
- | # @version 1 | + | # @version 2 |
# @homepage ~~SELF~~ | # @homepage ~~SELF~~ | ||
# @require WinSCP 5.9.2 | # @require WinSCP 5.9.2 | ||
Line 38: | Line 38: | ||
# Use Generate URL function to obtain a value for -sessionUrl parameter. | # Use Generate URL function to obtain a value for -sessionUrl parameter. | ||
$sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/", | $sessionUrl = "sftp://user:mypassword;fingerprint=ssh-rsa-xx-xx-xx@example.com/", | ||
- | [Parameter(Mandatory)] | + | [Parameter(Mandatory = $True)] |
$localPath, | $localPath, | ||
- | [Parameter(Mandatory)] | + | [Parameter(Mandatory = $True)] |
$remotePath, | $remotePath, | ||
[Switch] | [Switch] |