• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Internet Control (FTP Upload)

I am using Internet Control named "InetFTP"
If I execute this code,

InetFTP.Execute "", "PUT " & strSource & " " & strDest
This works fine. But if I change to the below code,

dim strURL as string
strURL = "" or
strURL = "" & ""

InetFTP.Execute strURL, "PUT " & strSource & " " & strDest
I got the error message saying "URL is malformed", Why?
  • 2
1 Solution
Post some of the other code you're using.
I couldn't duplicate your problem.  Try doing this -- set your URL property and then do:

Inet1.Execute , "Get ..."

Note the comma (first parameter is skipped).
What I did was similar to you but I loaded the Inet control a little differently. I set my DNSAddress as a Global variable. I have my Inet Control on my form and I put the code below in the module.

   frmImportIndex.Inet2.URL = DNSAddress
   frmImportIndex.Inet2.PassWord = SWord
   frmImportIndex.Inet2.UserName = SName
   frmImportIndex.txtFTPReceive.Text = frmImportIndex.Inet2.OpenURL

   Cmd$ = "GET c" + SalesNumber + ".exe

   frmImportIndex.Inet2.Execute frmImportIndex.Inet2.URL, Cmd$

try loading the strURL in to the INet URL before you execute the Control like I did above.

Hope this helps.
I have a PUT statement also for this if you would ratehr see that. I wasnt thinking when I posted it, sorry.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now