Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Using Site name instead of URL

First of all, we do not recommend this fragile approach of using GUI-configured site in scripting.
https://winscp.net/eng/docs/scripting#configuration

Anyway, the scripting probably does not see your GUI configuration. Does GUI store the configuration to INI file or registry?
Please post session log file both from the GUI and the script.
jrwms2

Using Site name instead of URL

Yesterday this was all working fine today none of the WinSCP scripting works. We have a site call XYZ it is setup and and uses SFTP url FTP.mysite.com username and password are correct and using the GUI it works fine.

But from a cli we run
C:\"Program Files (x86)"\WinSCP\winscp.com /script="\\uncpath\B2C_Data\Scripts\xyz_FileMover_Inbound_Prod.txt"

in the text file we have OPEN XYZ which is how it has been in the text file for over 9 years now and all of the sudden we run it and the error we see is "cannot fine XYZ" yet open winscp and run open site from GUI and works fine.

In the text file according to all docs says you just put Open "site" so open "XYZ" and it should work but everything we can find or try says hostname cannot be found.