Exception calling "ParseUrl" with "1" argument(s)
I'm using WinSCP 5.15.9 (Build 10071) and setting up a second implementation of your unmodified downloadNewFiles.ps1 script. The first worked flawlessly (thank you!). On the second, I'm receiving the error above. I'm not going to attach the ps1 script since you have and know it, but I will copy in the error and sanitized calls to the script.
Error:
Error: Exception calling "ParseUrl" with "1" argument(s): "Root folder can be sp
ecified for WebDAV protocol only
Parameter name: url"
This call works:
powershell.exe -File C:\dtl_ftp\bin\downloadNewFiles.ps1 -sessionUrl "sftp://uname1:pward1;fingerprint=ssh-rsa 1024 fingertext1=@IP1:port1/" -localPath "C:\dtl_ftp\Temp\ftp_site1" -remotePath "/" -listPath "C:\dtl_ftp\conf\Site1_List\Site1_Downloaded.txt" -sessionLogPath "C:\dtl_ftp\logs\site1\site1_Download_Log.log"
This call generates the error:
powershell.exe -File C:\dtl_ftp\bin\downloadNewFiles.ps1 -sessionUrl "sftp://uname2:pword2;fingerprint=ssh-ed25519 256 finger/text/2=@IP2/" -localPath "C:\dtl_ftp\Temp\site2_Raw_Data" -remotePath "/site2-data-feed/" -listPath "C:\dtl_ftp\conf\site2_Data_Feeds_Lists\site2_Downloaded.txt" -sessionLogPath "c:\dtl_ftp\logs\sftp_site2_com\site2_Download_Log.log"
I'm at a loss as to what is causing the error. The only suspect I have is the presence of "/" characters in the fingerprint ID of the second call. Could that be it? If so, so I escape them? Enclose them in a second set of quotes?
Thanks in advance,
VtR
Error:
Error: Exception calling "ParseUrl" with "1" argument(s): "Root folder can be sp
ecified for WebDAV protocol only
Parameter name: url"
This call works:
powershell.exe -File C:\dtl_ftp\bin\downloadNewFiles.ps1 -sessionUrl "sftp://uname1:pward1;fingerprint=ssh-rsa 1024 fingertext1=@IP1:port1/" -localPath "C:\dtl_ftp\Temp\ftp_site1" -remotePath "/" -listPath "C:\dtl_ftp\conf\Site1_List\Site1_Downloaded.txt" -sessionLogPath "C:\dtl_ftp\logs\site1\site1_Download_Log.log"
This call generates the error:
powershell.exe -File C:\dtl_ftp\bin\downloadNewFiles.ps1 -sessionUrl "sftp://uname2:pword2;fingerprint=ssh-ed25519 256 finger/text/2=@IP2/" -localPath "C:\dtl_ftp\Temp\site2_Raw_Data" -remotePath "/site2-data-feed/" -listPath "C:\dtl_ftp\conf\site2_Data_Feeds_Lists\site2_Downloaded.txt" -sessionLogPath "c:\dtl_ftp\logs\sftp_site2_com\site2_Download_Log.log"
I'm at a loss as to what is causing the error. The only suspect I have is the presence of "/" characters in the fingerprint ID of the second call. Could that be it? If so, so I escape them? Enclose them in a second set of quotes?
Thanks in advance,
VtR