Ik wil met behulp van de 'Internet Transfer Control' van Microsoft verschilende ftp commando's uitvoeren. Maar hij voert alleen het eerste commando uit wat is het probleem in onderstaande code?
Visual Basic:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| Private Sub connect2FTP() Dim lsCommand As String Dim lsCommand2 As String Dim lsCommand3 As String Dim lsCommand4 As String ' FTP Commands lsCommand = "prompt off" lsCommand2 = "put c:/ftp/files/ftp.txt /httpdocs/temp/workc2s/ftp.txt" lsCommand4 = "put c:/ftp/files/ftp2.txt /httpdocs/temp/workc2s/ftp2.txt" lsCommand3 = "quit" ' Open FTP Connection Inet1.Protocol = icFTP Inet1.URL = "......." Inet1.UserName = "......" Inet1.Password = "......" 'Execution of ftp commands If Inet1.StillExecuting = False Then Inet1.Execute , lsCommand End If If Inet1.StillExecuting = False Then Inet1.Execute , lsCommand2 End If If Inet1.StillExecuting = False Then Inet1.Execute , lsCommand4 End If If Inet1.StillExecuting = False Then Inet1.Execute , lsCommand3 End If End Sub |
Proud member of [DPC]Team_RC | Join Team RC