-
Command Prompt
HI ,
i'm new to .net, i'm tring to execute some commands in cmd prompt in vs 2008. can any pls help me.... (with out using BATCH FILE)
i want to execute the following commands....
----> FTP
----> open server name
----> user name
----> pswd
etc....
thanks in advance.....
-
Re: Command Prompt
Code:
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" _
(ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Defines the API:
Code:
lngINetConn = InternetConnect(lngINet, “ftp.microsoft.com”, 0, _
“anonymous”, “[email protected]”, 1, 0, 0)
That assigns to a variable:
Code:
Private Declare Function FtpGetFile Lib "wininet.dll" Alias "FtpGetFileA" _
(ByVal hFtpSession As Long, ByVal lpszRemoteFile As String, _
ByVal lpszNewFile As String, ByVal fFailIfExists As Boolean, _
ByVal dwFlagsAndAttributes As Long, ByVal dwFlags As Long, _
ByVal dwContext As Long) As Boolean
Will get a file:
Code:
blnRC = FtpGetFile(lngINetConn, “dirmap.txt”, “c:\dirmap.txt”, 0, 0, 1, 0)
Stores a file:
Code:
Private Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer
Defines the API:
Code:
InternetCloseHandle lngINetConn
InternetCloseHandle lngINet
And, closes the file
Or, try this: http://www.15seconds.com/component/pg001109.htm
-
Re: Command Prompt
Quote:
Originally Posted by
dglienna
Code:
Private Declare Function InternetOpen Lib "wininet.dll"
Thanks Alot for the reply....................
-
Re: Command Prompt
prince_XY143, I have noticed that you are struggling to Quote somebody. You will see at the bottom right of each post, there is a button labelled Quote, it is next to the Edit button. That is all you have to click :)
-
Re: Command Prompt