Differences
This shows you the differences between the selected revisions of the page.
| 2023-01-11 | 2023-01-11 | ||
| whitespaces (martin) | making refresh optional to allow standalone execution (martin) | ||
| Line 18: | Line 18: | ||
| # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^ | # @command powershell.exe -ExecutionPolicy Bypass -File "%EXTENSION_PATH%" ^ | ||
| # -sessionUrl "!E" -remotePath "!/" -pattern "%Pattern%" ^ | # -sessionUrl "!E" -remotePath "!/" -pattern "%Pattern%" ^ | ||
| - | # -replacement "%Replacement%" -pause -sessionLogPath "%SessionLogPath%" ^ | + | # -replacement "%Replacement%" -refresh -pause -sessionLogPath "%SessionLogPath%" ^ |
| # %PreviewMode% !& | # %PreviewMode% !& | ||
| # @description Renames remote files using a regular expression | # @description Renames remote files using a regular expression | ||
| # @flag RemoteFiles | # @flag RemoteFiles | ||
| - | # @version 6 | + | # @version 7 |
| # @homepage ~~SELF~~ | # @homepage ~~SELF~~ | ||
| # @require WinSCP 5.16 | # @require WinSCP 5.16 | ||
| Line 45: | Line 45: | ||
| [Switch] | [Switch] | ||
| $pause, | $pause, | ||
| + | [Switch] | ||
| + | $refresh, | ||
| $sessionLogPath = $Null, | $sessionLogPath = $Null, | ||
| [Switch] | [Switch] | ||
| Line 132: | Line 134: | ||
| } | } | ||
| - | & "$env:WINSCP_PATH\WinSCP.exe" "$sessionUrl" /refresh "$remotePath" | + | if ($refresh) |
| + | { | ||
| + | ············& "$env:WINSCP_PATH\WinSCP.exe" "$sessionUrl" /refresh "$remotePath" | ||
| + | } | ||
| } | } | ||