School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,150 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,872 people online right now. Registration is fast and FREE... Join Now!



FTP, Unzip and Execute- VB.NET

FTP, Unzip and Execute- VB.NET Rate Topic: -----

#1 nmurendo  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: New Members
  • Posts: 7
  • Joined: 12-September 08


Dream Kudos: 0

Posted 01 December 2008 - 05:33 AM

Can anyone good in .NET please convert this VB6 please. VB6 has post deployment errors for example where it says files are out of date. I need this for getting a named file from an ftp site, unzip it and run the executable.

Option Explicit
Public success As Long
Private Sub Form_Load()
 Dim i As String
 Dim j As String
 Dim k As String
 On Error GoTo ErrH
 Inte_Pro
 Unzip_Files
 Execute_Files
 Debug.Print "Finished download"
 Unload Me
 Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
 Exit Sub
End Sub
Public Sub Execute_Files()
 On Error GoTo ErrH
 Dim RetVal
 RetVal = Shell(App.Path & "\RouteSmsSMPPClient.exe", 1)
Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
 Exit Sub
End Sub
Public Sub Unzip_Files()
 On Error GoTo ErrH
		ZIPLight1.ZipFileName = App.Path & "\RouteSmsSMPPClient.zip"
		ZIPLight1.ExtractDirectory = App.Path
		ZIPLight1.FilesToProcess = "*"
		ZIPLight1.Extract
		Exit Sub
ErrH:
  MsgBox Err.Description & vbCr & Err.Source
 Exit Sub
End Sub
Public Sub Inte_Pro()
Dim RemoteFile, LocalFile
	RemoteFile = "RouteSmsSMPPClient.zip"
	Form1.Inet1.URL = "ftp://192.168.1.14/"
	'Form1.Inet1.URL = "ftp://serv13:21/FTPFiles/"
	Form1.Inet1.Execute , "Get " & RemoteFile & " " & App.Path & "\" & RemoteFile
	  
End Sub

Was This Post Helpful? 0
  • +
  • -


#2 VB Crash  Icon User is offline

  • D.I.C Head
  • PipPip
  • Group: Members
  • Posts: 130
  • Joined: 28-November 08


Dream Kudos: 0

Posted 01 December 2008 - 08:12 AM

Well I'm not sure that will works..but I'll give you try...

Vace
Was This Post Helpful? 0
  • +
  • -

#3 Jayman  Icon User is online

  • Student of Life
  • Icon
  • View blog
  • Group: Admins
  • Posts: 8,836
  • Joined: 26-December 05


Dream Kudos: 500

Expert In: Everything

Posted 01 December 2008 - 10:15 AM

Open the project in VS.NET. There is a conversion wizard that will do most of the work for you.
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month