Differences
This shows you the differences between the selected revisions of the page.
2022-06-16 | 2023-01-04 | ||
5.20 Change: SHA-256 fingerprints are not padded anymore (martin) | fixes the error when renaming the files, containing the square brackets " [ ] " in names in directories with names, containing square brackets. i.e. something like dir/[super] dir/[normal] file.ext (75.80.156.9) | ||
Line 122: | Line 122: | ||
Write-Host "$file => $newName" | Write-Host "$file => $newName" | ||
- | $fullName = [WinSCP.RemotePath]::Combine($remotePath, $file) | + | $fullName = [WinSCP.RemotePath]::Combine($remotePath, $file.replace("[", "[[]")) |
$fullNewName = [WinSCP.RemotePath]::Combine($remotePath, $newName) | $fullNewName = [WinSCP.RemotePath]::Combine($remotePath, $newName) | ||
$session.MoveFile($fullName, $fullNewName) | $session.MoveFile($fullName, $fullNewName) |