|
-
Jan 7th, 2003, 03:21 AM
#1
Thread Starter
Hyperactive Member
ftp - is there a neater way to do this?
I've written a little routine for an app that takes a file from my local computer here and uloads it to my website:
Code:
Dim myFile As IO.File
Dim SW As IO.StreamWriter
SW = myFile.AppendText(cWorkFile)
SW.WriteLine("open www.stingrae.com.au")
SW.WriteLine(cUserID)
SW.WriteLine(cPassword)
SW.WriteLine("put " & cFileName)
SW.WriteLine("quit")
SW.Close()
Dim p As Process
p.Start("ftp -s:" & cWorkFile)
myFile.Delete(cWorkFile)
the code works, but being the perfectionist that i am, i would really prefer a better scenario. like, at the moment, i have no idea whether it connects or works or anything! what's worse, is that if it doesn't work, then the user id & password are both sitting in a plain text file on the local pc! aaaahhhh!!
are there any neat vb.net commands to do this? surely with all the technology now available, puting a file on a web site should be simple?
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Jan 7th, 2003, 07:54 AM
#2
yay gay
sure there are a lot of ways of doin this:
they're all in System.Net, you can use System.Net.Sockets...but look at allapi.net they have a download class for HTTP and FTP on the .NET classes part of the site, it includes progress and everything
\m/  \m/
-
Jan 7th, 2003, 10:41 PM
#3
Thread Starter
Hyperactive Member
cool. thanks for that. i just checked out the site and it looks very useful.
i'll try a few and see how i go.
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Jan 9th, 2003, 12:50 AM
#4
Thread Starter
Hyperactive Member
i'm guessing that this is the function that i want:
FTP Put File
but i can't figure out how it works. at the bottom it says that there's no .Net example available.
is anyone able to post a .Net example?
thanks
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|