[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Dos Commands

Posted on 2000-01-13
5
Medium Priority
?
131 Views
Last Modified: 2010-05-02
With my internet connection open, I download FTP files using the following commands at the DOS Prompt:

C:

CD\

FTP

Open ftpprv.ftpsit.net

myusername

mypassword

bin

get ftpfile.zip

How can I issue these commands using VB5?
0
Comment
Question by:deross
5 Comments
 
LVL 3

Expert Comment

by:Gordonp
ID: 2348422
use the Internet Transfer Control,

and use code like -

With Inet1
        .UserName = "myusername"
        .Password = "mypassword"
        .Execute "ftpprv.ftpsit.net", "bin"
        .Execute , "get ftpfile.zip"
    End With


0
 
LVL 1

Expert Comment

by:aut
ID: 2350632
Alternatively, you can use the WinINet API (and avoild the INet control's overhead)
0
 

Expert Comment

by:knipec
ID: 2352214
Another way might be to use a command line shell and run the FTP command. You can tell the FTP to run a script. This has the advantage of divorcing the script from the action so that multiple scripts can be used and/or the script can be modified without a recompile.
0
 
LVL 1

Accepted Solution

by:
Belatucadros earned 400 total points
ID: 2355889
I'm not sure how exactly you want to do it, but you could jsut make that a .bat file and shell to it....
Here:
shell("command.com /c PathandFileToRun Commuters CommandLine"), vbHide
' /c tells command.com to run a command and exit

 C ya!
0
 
LVL 1

Expert Comment

by:aut
ID: 2357360
I have a comment:
In the accepted answer (from belatucadros), the idea of a batch file will not work!

The batch file will not allow statements that are meant for the ftp program (such as GET, BIN, and the username and password)!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses
Course of the Month7 days, 16 hours left to enroll

607 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