How to call the javascript non-interactively from SSIS?
From this website, I followed the instruction on how to get the file download from SFTP site using SSIS package, and it works fine. But I also need to make sure I download only the latest file, so I looked at the javascript code that is also available on this website. https://winscp.net/eng/docs/script_download_most_recent_file. I use the script as is, and only changed to my directories and connection information. However, when I tried to run the code inside SSIS using cscript.exe as the site suggested it (cscript /nologo loadlatestfiles.js), the SFTP interface keeps pop up forcing me to enter the user/pasword manually and download the file manually, even though I did change the script to put in option batch on and option confirm off, yet the SFTP interface still pops up. Shouldn't it work as a non-interactive? The code I put inside SSIS Execute Process Task is like this :
-- Executable: C:\WINDOWS\System32\CScript.exe
-- Argument: /nologo loadlatestfiles.js
-- Current Directory: C:\Myfolder\Scripts\
I tried to run this same code on command line, and the same thing happens - SFTP login interface would pops up. I'm using window command line, SSIS/VS 2008, winscp 4.2.9. So, my question is how can I call this javascript from SSIS non-interactively.
-- Executable: C:\WINDOWS\System32\CScript.exe
-- Argument: /nologo loadlatestfiles.js
-- Current Directory: C:\Myfolder\Scripts\
I tried to run this same code on command line, and the same thing happens - SFTP login interface would pops up. I'm using window command line, SSIS/VS 2008, winscp 4.2.9. So, my question is how can I call this javascript from SSIS non-interactively.