Hi,
I am trying to automate my winscp script to download files froma ftp server
This is my winscp code and text file (courtesy - Pat Hartman).
and this is my text file
It is not retrieving any files. Is the winscp command script correct?
The mget downloads the files which are in FTPRCV type and saves it as .txt
What am I doing wrong?
When I use winscp manually from GUI, I am able to get these files.
In our organization, they have a version of winSCP on which the Generate code and other features are disabled
How to direct the code to a log file?
TIA
I am trying to automate my winscp script to download files froma ftp server
This is my winscp code and text file (courtesy - Pat Hartman).
Code:
Private Sub Command1_Click()
Dim strQuote As String
strQuote = Chr(34)
Dim strSFTPDir As String
strSFTPDir = "C:\Program Files (x86)\Winscp\"
Dim strCommand As String
strCommand = "/script=C:\Daily\inputs\dtccwinscpfile.txt" 'change the file name/path specific to your computer
Call Shell(strSFTPDir & "winscp.exe " & strQuote & strCommand & strQuote, vbNormalNoFocus)
End Sub
and this is my text file
Code:
open 10.xxx.x.xx
2852
pwd3478!#
cd /ftphome
lcd /DeliveryOrders
mget *.ftprcv \\10.xxx.xx.xx\backupshare\205\Reports\DTCC\dtcc\*.txt
quit
It is not retrieving any files. Is the winscp command script correct?
The mget downloads the files which are in FTPRCV type and saves it as .txt
What am I doing wrong?
When I use winscp manually from GUI, I am able to get these files.
In our organization, they have a version of winSCP on which the Generate code and other features are disabled
How to direct the code to a log file?
TIA
Last edited: