Differences

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

2017-12-21 2018-02-19
generate url commands have been renamed while ago (martin) 5.13 RemotePath class (martin)
Line 19: Line 19:
# @description  Renames remote files using a regular expression # @description  Renames remote files using a regular expression
# @flag        RemoteFiles # @flag        RemoteFiles
-# @version      3+# @version      4
# @homepage    ~~SELF~~ # @homepage    ~~SELF~~
-# @require      WinSCP 5.8.4+# @require      WinSCP 5.13
# @option      - -run group "Rename" # @option      - -run group "Rename"
# @option        Pattern -run textbox "Replace file name part matching this pattern:" # @option        Pattern -run textbox "Replace file name part matching this pattern:"
Line 117: Line 117:
                Write-Host "$file => $newName"                 Write-Host "$file => $newName"
-                $fullName = $session.CombinePaths($remotePath, $file) +                $fullName = [WinSCP.RemotePath]::CombinePaths($remotePath, $file) 
-                $fullNewName = $session.CombinePaths($remotePath, $newName)+                $fullNewName = [WinSCP.RemotePath]::CombinePaths($remotePath, $newName)
                $session.MoveFile($fullName, $fullNewName)                 $session.MoveFile($fullName, $fullNewName)
            }             }

Last modified: by martin