Q:

vbs code for WinScp,not reading credentail files

I have a task to upload file to sftp server.I am using winscp to accomplish this.Downloaded and installed winscp in the computer.Also I downloaded and extracted zip file CheckSFTP.zip from the site
https://gallery.technet.microsoft.com/office/VBScript-and-SFTP-Protocol-fd1ff667
When I extracted the zip file I got three files
CheckSFTP.txt,TestSFTP.vbs and TestFile.txt
The .vbs file file contain the code to run winscp.That portion of the code is running properly.But it also have the code to upload TestFile.txt to sftp server.
To upload this file the winscp requires sftp server credentials which is given in CheckSFTP.txt.
I saved the extracted contents of zip file in D:\MyFolder\ForSFTP
The below line of code displays CheckSFTP.txt doesnot exists in th path
 ObjShell.Run Chr(34) & StrMasterPath & Chr(34) & "/console/script="& Chr(34) & StrFilePath & "\CheckSFTP.txt" & Chr(34), 0, True

The error output is as follows

A:

You should probably change the statement to this:
ObjShell.Run Chr(34) & StrMasterPath & Chr(34) & " /console /script=" & _
  Chr(34) & StrFilePath & "\CheckSFTP.txt" & Chr(34), 0, True

since /console and /script seem to be parameters.

