Exception calling "ParseUrl" with "1" argument(s)

Advertisement

Vann_the_Red
Joined:
Posts:
27
Location:
NC, USA

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

Reply with quote

Advertisement

Vann_the_Red
Joined:
Posts:
27
Location:
NC, USA

Martin,

Thank you for the link; I'm looking into that now. The information in my call was copy/pasted from the WinSCP GUI.

Regards,

Aaron

Reply with quote

Vann_the_Red
Joined:
Posts:
27
Location:
NC, USA

Martin,

Session | Generate Session URL/Code. Generate session URL/Code window. .NET assembly code tab. Then a composite of the information there for HostName, UserName, Password, and SshHostKeyFingerprint. Have I done that incorrectly?

Thanks,

VtR

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,262
Location:
Prague, Czechia

Vann_the_Red wrote:

Session | Generate Session URL/Code. Generate session URL/Code window. .NET assembly code tab. Then a composite of the information there for HostName, UserName, Password, and SshHostKeyFingerprint. Have I done that incorrectly?
You wanted URL, so use "URL" tab (linked in my earlier post), not ".NET assembly code" tab.

Reply with quote

Advertisement

You can post new topics in this forum