Hello Winscp gurus,
Greetings! I am looking at a weird situation here- when I run the winscp ver. 4.2.1 in a wsf file, it runs perfectly and downloads the remote SFtp server file to our secure client directory.
Following are the commands in the abc.wsf file-
Set ScriptShell = CreateObject("WScript.Shell")
ScriptShell.run "%comspec% /c ""c:\Program Files\WinSCP\WinSCP.com"" -console -script=" &scriptFile& " -log=" & scriptResults
I run above on dos command line- cscript abc.wsf, it runs fine and it shows scriptResults correctly. Also, how do we do know that remote file is copied correctly to our client directory since winscp doesn't return a safe exit code?
2009-04-14 10:36:08.721 Type: SSH_FXP_READDIR, Size: 22, Number: 524
< 2009-04-14 10:36:08.737 Type: SSH_FXP_NAME, Size: 209, Number: 524
> 2009-04-14 10:36:08.737 Type: SSH_FXP_READDIR, Size: 22, Number: 780
< 2009-04-14 10:36:08.784 Type: SSH_FXP_NAME, Size: 2661, Number: 780
> 2009-04-14 10:36:08.784 Type: SSH_FXP_READDIR, Size: 22, Number: 1036
< 2009-04-14 10:36:08.799 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2009-04-14 10:36:08.799 Status/error code: 1
However, when I run the same in a batch file in Informatica Pre session of Work Flow Manager, the winscp seems to never run and I see two blank lines inserted into the scriptResults log file of winscp. Am I doing something wrong in the batch file which disables the winscp?
All I am doing in batch file is calling the above command
rem myabc.bat is called from Informatica WFM pre session