|
-
Jun 7th, 2002, 05:06 AM
#1
Thread Starter
Junior Member
Replacement for Winsock?!?
A program that I'm writing at the moment needs to connect to FTP servers. When connected, I change to the 'specified' directory and then I need to look for files that meet a certain file criterea. Any files found that meet this criterea are to be moved off of the server (using get and del commands) to a temporary directory before I connect to another FTP server and move the files to a specified directory on there.
Apparently we shouldn't use the Winsock controls in VB.Net bacause of performance issues with wrapped COM components.
I assume there is a real easy way of doing what I want within the .Net Fx(?!?)
Unfortunately all I can find in the online documentation is references to the HINTERNET handle with no real life example of how to implement it and besides, this looks far more complex than the Winsock control!
Will the WebClient control give me all the functionality i need? I notice that the WebClient control allows me to upload and download files, but I can't see any way of deleting files.
Or maybe somebody knows an even easier way?!?
Help, please!!!
-
Jun 7th, 2002, 05:44 AM
#2
Addicted Member
Use the system.net namespace and the FileWebRequest class.
Wind and waves resolves all problems.
-
Jun 7th, 2002, 07:15 AM
#3
Thread Starter
Junior Member
Ok. Could somebody just give me a quick crash course on how to use the System.Net.FileWebRequest namespace - The online documentation gives no real examples of what commands to use and in which order things should be done in.
Ta.
-
Jun 7th, 2002, 09:09 AM
#4
Addicted Member
This is in C# but might give you an idea. Let me knowif you find a VB example.
http://www.c-sharpcorner.com/Tools/BasicFTPPL.asp
Wind and waves resolves all problems.
-
Jun 9th, 2002, 12:13 PM
#5
Thread Starter
Junior Member
I don't have C# so couldn't read the source code. I think I should be concentrating on the System.Net namespace to do this but can't find a decent example anywhere of how to go about it. Any ideas???!?
-
Jun 9th, 2002, 01:27 PM
#6
You can open the C# source code in Notepad. You don't need the IDE. Hell, you can write your C# code in notepad all the way, and compile it using the free compiler that is with the framework.
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
|