How to call the javascript non-interactively from SSIS?
I finally got this figured out, fixed, and it works fine now.
The log from Winspc initially did not generate because by default the interface has the log as Normal, but it should be changed to either bug1 or bug2 to have the log generates when there is an error. So, when I changed it, it generated the error process. Also, our sftp this morning went through a change of password right exactly the time I was testing on this, so this is why it ran but it didn't do anything, and without using the log, I could not figure out why it did not work.
Anyway, in summary, for those of you who wants to use winscp to connect to SFTP (a task component that is currently not available in SSIS) using SSIS, below is how you can set it up as I already mentioned earlier. Use Execute Process Task >> Edit >> Process option, and put the following information: Executable: C:\WINDOWS\System32\CScript.exe Arguments: /nologo LoadRecentFiles.js Working Directory: C:\MyFolder\Scripts\. Then, your LoadRecentFiles.js (or whatever the name you name this file) is script of downloading the latest file that is available from this website, https://winscp.net/eng/docs/script_download_most_recent_file. Just change your username, password, directory locations, then you all set. Make sure you keep the trailing slash where it said so or it won't work.
The only thing left I have to do now is to hide the cscript console while it is executing and I believe there is an instruction on that as well on this website.
Thanks prikryl very much for showing me how to configure and look at the log. Your code works wonderfully. Keep up the great work.
The log from Winspc initially did not generate because by default the interface has the log as Normal, but it should be changed to either bug1 or bug2 to have the log generates when there is an error. So, when I changed it, it generated the error process. Also, our sftp this morning went through a change of password right exactly the time I was testing on this, so this is why it ran but it didn't do anything, and without using the log, I could not figure out why it did not work.
Anyway, in summary, for those of you who wants to use winscp to connect to SFTP (a task component that is currently not available in SSIS) using SSIS, below is how you can set it up as I already mentioned earlier. Use Execute Process Task >> Edit >> Process option, and put the following information: Executable: C:\WINDOWS\System32\CScript.exe Arguments: /nologo LoadRecentFiles.js Working Directory: C:\MyFolder\Scripts\. Then, your LoadRecentFiles.js (or whatever the name you name this file) is script of downloading the latest file that is available from this website, https://winscp.net/eng/docs/script_download_most_recent_file. Just change your username, password, directory locations, then you all set. Make sure you keep the trailing slash where it said so or it won't work.
The only thing left I have to do now is to hide the cscript console while it is executing and I believe there is an instruction on that as well on this website.
Thanks prikryl very much for showing me how to configure and look at the log. Your code works wonderfully. Keep up the great work.