I have an MS Access Application that makes a daily backup of the data files. During the process a folder is created on the LAN Server and the required data is copied to that folder. After the data is copied to the applicable folder we want the new folder to be uploaded to an FTP Server automatically.
I have the following code that I am battling with:
Private Sub btnDailyExport_Click()
Const ftpApp As String = """C:\Itcan\XXXX\bin\ftp\pscp.exe"""
Dim strCmd As String
Dim gUser As String
Dim gPass As String
Dim gHost As String
Dim gFile As String
Dim ftpSource As String
ftpSource = "V:\Itcan\Backup\Daily Export\"
gUser = "abcdefg"
gPass = "123456789"
gHost = "126.96.36.199:\root\foldername"
gFile = ftpSource 'the folder name where the backup was made on the LAN Server
strCmd = ftpApp & " -sftp -p -r " & gUser & " -pw " & gPass & " " & gFile & " " & gHost
Shell strCmd, 1 ' vbNormalFocus '
I am running the latest software in all respects and I have tried just about every suggested solution I was able to find through Google. I have also added the applicable exceptions to the Firewall settings. All I get is a DOS Window that pops up and hangs around for 30 seconds and then closes.