I am getting syntax error in the line
shellCmd = strQuote & strSFTPDir & "winscp.exe" strQuote & " " & strQuote & strCommand & strQuote
This is my complete code
Code:
Dim strQuote As String
Dim shellCmd As String
Dim strCommand As String
Dim strSFTPDir As String
strQuote = Chr(34)
strSFTPDir = "c:\program files (x86)\winscp\"
strCommand = "/script=c:\dtcc.txt" 'change the file name/path specific to your computer
shellCmd = strQuote & strSFTPDir & "winscp.exe" strQuote & " " & strQuote & strCommand & strQuote
Debug.Print shellCmd 'This output can be used for testing!
Call Shell(shellCmd, vbNormalNoFocus)