?
Solved

send file using TCPIP

Posted on 2001-08-22
4
Medium Priority
?
230 Views
Last Modified: 2012-08-14
Hi all.
how can I send a file using TCPIP? I need  the command to do this.
Thank you
0
Comment
Question by:omarmallat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Expert Comment

by:cwrea
ID: 6414812
There are a number of higher level TCP/IP-based protocols that can be used for file transfer, including FTP and HTTP.  Did you have a specific one in mind?
0
 

Accepted Solution

by:
twilhelm earned 150 total points
ID: 6415146
This is a piece of the selection of coding using the internet transfer control to ftp a file from one system to another.  This example is transfering from the IFS of as/400 to a PC. (inetget is the internal transfer control that you will need to add to the form.



'Setup Internet transfer control properties from INI
' this will also build the URL property

InetGet.RemoteHost = strIPAddr
InetGet.RemotePort = strPort
InetGet.UserName = strUserName
InetGet.Password = strPassword
 
'Build get  string (directly from as400 file not working
'strGet = "RECV" & " " & str400Lib & "/" _
 '& str400File & " " & strPCFile

'Build get string (retrieve file from 400 folder)
strGet = "RECV" & " " & "/qdls/gbadoc/" & str400File _
& " " & strPCFile

'Strip dir path from strpcfile
lngPos = InStrRev(strPCFile, "\", -1, 1)
If lngPos = 0 Then
strStipFile = strPCFile
Else
lngPos = lngPos + 1
strStipFile = Mid(strPCFile, lngPos)
End If

' Kill strPCFile if exist
If (Dir(strPCFile)) = strStipFile Then
Kill strPCFile
End If

'set off error flag
intError = 0

'Display message screen
frminfo.Show (Modeless)

'Run FTP Command string
InetGet.Execute , strGet
zsWaitForResponse

'Quit FTP Processing
InetGet.Execute , "QUIT"

'Display message box and unload information screen
Unload frminfo
If intError = 0 Then
MsgBox "File Download Complete", vbInformation, "Downloading"
End If

End Sub
Sub zsWaitForResponse()
Do Until Not InetGet.StillExecuting
 DoEvents
If intCount < 25 Then
intCount = intCount + 0.001
frminfo.prgDload.Value = intCount
End If
Loop
'Set progress bar at 100%
If intError = 0 Then
Do While frminfo.prgDload.Value < 97
intCount = intCount + 0.001
frminfo.prgDload.Value = intCount
Loop
End If

End Sub
   


Private Sub cmdExit_Click()
Unload frmSelection

End Sub

Private Sub InetGet_StateChanged(ByVal State As Integer)
 
   
    Select Case State
     Case icResolvingHost '1
       frminfo.lblInformation.Caption = "Verify Host IP Address"
     Case icHostResolved '2
      frminfo.lblInformation.Caption = "Host IP Address Found"
     Case icConnecting ' 3
       frminfo.lblInformation.Caption = "Connecting to Host Computer"
     Case icConnected '4
       frminfo.lblInformation.Caption = "Successful Connect"
     Case icRequesting '5
       frminfo.lblInformation.Caption = "Sending Request"
     Case icError ' 11
       MsgBox "Error Downloading File, Verify Configuration and Naming Convention Information", vbInformation, "Error"
       intError = 1
     End Select
   
             
0
 
LVL 1

Expert Comment

by:krees
ID: 6415615
Please, dont lock the questions
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6697175
If this proposed answer has helped you, please accept it, grade it and close this question.  If it did not, reject it and add comments as to your progress and what else is needed.  If no action is taken here by next week, we'll need to decide this outcome.  Expert input always welcome as well.

Thanks,
Moondancer
Community Support Moderator @ Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question