Problems downloading file with "]" character in name
Good afternoon. I am trying to download a file from an FTP server using WinSCP. But it is not working when the name of the file contains the character
Any tip? Thanks
]
. I tried to escape the character with backtip but it doesn't work.
Any tip? Thanks
# Configuración de conexión al servidor SFTP $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ Protocol = [WinSCP.Protocol]::Sftp HostName = "xx" UserName = "xx" Password = "xx" GiveUpSecurityAndAcceptAnySshHostKey = $true } # Carpeta remota y local $remotePath = "/Xplora px" $localPath = "C:\Descargas" # Nombre exacto del archivo a descargar $targetFileName = "Prexi[t.sdat" Write-Host "Descargando: $remoteFilePath -> $localFilePath" $transferResult = $session.GetFiles($remoteFilePath, $localFilePath, $false)