Script gives problem when called through a .vbs file
Hi!
I have writen a script to upload some files. I call that script from my C# code. But, it gives me an error "the system cannot find the file specified". Strange thing is when I call that script from my command line then there is no problem.
Flow is like this (I have a VBScript file(.vbs) (generated by C# code), which creates the script on the fly and calls it.)
This is how I call the script through my .vbs file.
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run ("WinSCP.com /script=" & strFTPScriptFileName)
But, it prompts me an error "the system cannot find the file specified". But, the same generated script, when I call from command line by giving the command WinSCP.com /script= txtSomething.txt, it works. Also, if I run the .vbs file from the command line, then also it works. Pls Help!
I have writen a script to upload some files. I call that script from my C# code. But, it gives me an error "the system cannot find the file specified". Strange thing is when I call that script from my command line then there is no problem.
Flow is like this (I have a VBScript file(.vbs) (generated by C# code), which creates the script on the fly and calls it.)
This is how I call the script through my .vbs file.
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run ("WinSCP.com /script=" & strFTPScriptFileName)
But, it prompts me an error "the system cannot find the file specified". But, the same generated script, when I call from command line by giving the command WinSCP.com /script= txtSomething.txt, it works. Also, if I run the .vbs file from the command line, then also it works. Pls Help!