FTP program that downloads files
FTP program that downloads files
FTP program that downloads files
FTP program that downloads files
FTP program that downloads files
FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files
FTP program that downloads files FTP program that downloads files
FTP program that downloads files
Go Back  Xtreme Visual Basic Talk > > > FTP program that downloads files


Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2008, 02:56 PM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default


Edit by Moderator: Please start you own threads if you have a question rather than 'piggyback' on someone else's. By all means refer to another Thread if it assists, as I have done for you this time. Thanks


Re: FTP program that downloads files

Sorry for the topic bump, but I've been looking into making an Auto-Updater for a game I develop for. Well, for private servers really. And this is the first topic that I've found that specifically meets what I want. I want the Application to connect to the FTP Server via anonymous/UID/PWD, either of the two would work. It would need to Check the dates, if the files on the FTP Server are newer, it would download them, if they were the same, then it'd continue to load "Game.exe". I am like malaize2, I'm quite new to Visual Basic, I'm taking it because of my college. Its a requirement for Multimedia & GameDesign students. I've been looking over the codes, and it doesn't quite make sense to me. I have to code this on my own, with little or no help. Thanks in advance.


Edit: Also, Piggy, I went to your website out of curiosity. I noticed that you're images/logo.gif? is missing. Just thought I'd let you know.

Last edited by DougT; 02-09-2008 at 01:17 AM.
Reply With Quote
  #2  
Old 02-11-2008, 07:26 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Lightbulb

Hi Zenzija,

and welcome to the site, first thanks for the logo.gif information, an auto updater you say .

The code I uploaded on the site, is not really good enough for a game auto updater, as a matter of fact your in look, I've just finished and Auto Updater for my work programs, so I can help, I'll not do the work for you, its more fun if you try but I can point you in the right direction if you like.

Quote:
Check the dates
This is all good but also another improvement would be to bit check it using CRC32, this is how I did it, this makes it 99.99% that the file has been downloaded ok.

pig.
Reply With Quote
  #3  
Old 02-11-2008, 08:20 AM
PrOpHeT's Avatar
PrOpHeTFTP program that downloads files PrOpHeT is offline
Hopelessly confused...

* Expert *
 
Join Date: Mar 2001
Location: Tyler, Tx.
Posts: 3,055
Default

Another option would be to include a standard updates.xml file in the directory that you always download, in there you could provide the relevant information about what does exist on the server so the client can make a local determination of what it does or does not need, what it depends on, what order it must be installed in, etc... from there you can download the appropriate files and save the overhead of retrieving information you do not need.
__________________
When you earnestly believe you can compensate for a lack of skill by doubling your efforts, there's no end to what you can't do ;)

For the love of Gold...
Reply With Quote
  #4  
Old 02-11-2008, 08:35 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

Yeah PrOpHeT,

I was going to mention that next time around, did not to give him to much information to quickly.

I've gone the same route, but with a main X.mal file as well as serveral sub xml file these i can take out if I needed to gives you more flexibility then.
Reply With Quote
  #5  
Old 02-11-2008, 05:14 PM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default

Thanks for the replies. I'm still quite new to Visual Basic .Net itself. This is actually a 2 part setup. But I'm coding this Auto-Updater for a final in my programming class. Its a beginners class, and my teacher doesn't even know what myWebClient is, and nor do I. I've got about a week or two to get it done.


Edit: Instead of double posting. I just went ahead and edited my post. My final is actually due NEXT Monday. And I've found a few things out so far. The FTP Upload/Download part is whats kicking me in the pants. Also, how do you make "Ctrl + S = Save" work?

Last edited by Zenzija; 02-11-2008 at 09:40 PM. Reason: Updated Information
Reply With Quote
  #6  
Old 02-12-2008, 05:25 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

Hi Zenzija,

Originally when I wanted to code my Auto Updater I used some reference stuff from this Article http://www.codeproject.com/KB/vb/autoupdate.aspx this helped me loads, although a little minimalistic for what i wanted, I took the authors ideas and improved on it for my needs.

if you need further help just post!!

pig.
Reply With Quote
  #7  
Old 02-12-2008, 03:04 PM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default

Quote:
Originally Posted by piggybank1974 View Post
Hi Zenzija,

Originally when I wanted to code my Auto Updater I used some reference stuff from this Article http://www.codeproject.com/KB/vb/autoupdate.aspx this helped me loads, although a little minimalistic for what i wanted, I took the authors ideas and improved on it for my needs.

if you need further help just post!!

pig.
Thanks for the reply Piggy.

I was reading that page you sent me, its quite interesting, and I think I might be able to do the same as what you did. In that tutorial, they said it would be a hidden update, I was hoping to use Progress Bars to show the progress of the current download, and then the overall progress of the whole update. I'm trying to find time between this project and my other 2 I have going. I've got to study for finals, and complete these projects. =/ Visual Basic .Net is confusing for me sometimes.
Reply With Quote
  #8  
Old 02-12-2008, 04:47 PM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

Yeah my idea was to use a progress bar also, my own progress bar controls no less, as you want to give feed back(the progress of the download), you will have to use the 'Net.WebClient' DownloadDataAsync callback method as the straight forward .DownloadFile of the WebClient class will block the main thread untill it has finished.

I can describle the process I when throgh to get my version working, but it is a little more complicated than the article it was based on, this may help you??

pig.
Reply With Quote
  #9  
Old 02-12-2008, 07:47 PM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default

It does help me. If its simpler to use a Label and make it count from 0% all the way to 100%, we can do that too. My teacher said he's looking forward to seeing my code. To be honest Piggy, I don't even know where to start looking, or to start coding. This sort of thing confuses me. I'm a slow learner, and things have to be pounded into my head for me to remember them. I have whats called "short term memory loss", which means, anything thats not repeated, or pounded into my head, I'll forget. I try my hardest and try to do my best, but I'm having second thoughts about my schooling, and programming. What do you think? Things have to be explained in depth to me, and I have to take baby steps. Do you have MSN or AIM?

MSN: master.zenzija@gmail.com
AIM: ZSandman01
Reply With Quote
  #10  
Old 02-14-2008, 05:26 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

Hi Z,

I've got the hammer ready as we post , I know I'm not allowed to goto far with help you as the forum leader will drop the posts, so i will describe how it is done and to what to look for trying to code it, then you are doing it on your own, The forum is quiet strick on school projects and possibly so!!

So if your ok with this we can start straight away!!

Although I see your MSN/AIM i want to try to help and guide others so posting here in this link is vital i think if thats ok.

pig.

Last edited by piggybank1974; 02-14-2008 at 05:28 AM. Reason: my spelling is **** today
Reply With Quote
  #11  
Old 02-14-2008, 11:25 AM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default

Quote:
Originally Posted by piggybank1974 View Post
Hi Z,

I've got the hammer ready as we post , I know I'm not allowed to goto far with help you as the forum leader will drop the posts, so i will describe how it is done and to what to look for trying to code it, then you are doing it on your own, The forum is quiet strick on school projects and possibly so!!

So if your ok with this we can start straight away!!

Although I see your MSN/AIM i want to try to help and guide others so posting here in this link is vital i think if thats ok.

pig.
Yeah. Its fine. I just hope I can accomplish this before class in a week and a half. This originally was a side project of mine, but I got lazy, and just thought I'd do this project instead of another for my final. I didn't feel like thinking up something else.
Reply With Quote
  #12  
Old 02-15-2008, 06:32 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Lightbulb Tutorial Part 1

So Here goes

I will help you to create a download that is similar to my own version see the Attatchment I've uploaded to the site.

(1) First create a new project.
(2) in the main directory where the .exe is (../bin/debug)

We need to create a main XML file, this is a Text file so NotePad will be fine here, just save it as .xml

Quote:
<AllXMLS>
<XMLFile Name="tester.xml"/>
</AllXMLS>
Note this file would normally placed on a server

as you can see there is not much to my XMLs.xml file as of yet but this is the main file that is download from a website.

The information between ALLXMLS is a sub download of the main downloaded file e.g <XMLFile Name="tester.xml"/>

this is built this way to allow you to update certain parts of any individual XML
file so you could have that xml in there or not (sorry not explained very well).

(3) You need to import both 'system.IO' and 'system.Net' do this at the top of the form.

(4) We will be using both asynchronous(does not block thread) and [/b]non-asynchronous (blocks thread)

if you are unfamiliar with the above terms do some research as its good to get into the mind set.

(5) now create the Tester.xml or what ever you want to call it.

Quote:
<update>
<name file="Tester">
<filename>Tester.pdf</filename>
<fileversion></fileversion>
<filelastmodified>11/12/2007 14:36:33</filelastmodified>
<bytessize>29661</bytessize>
<CRC32>74916E12</CRC32>
<directory>\pdf</directory>
<closeMainApp>false</closeMainApp>
</name>

<name file="MainApp">
<filename>MainApp.exe</filename>
<fileversion>1.0.0.1</fileversion>
<filelastmodified></filelastmodified>
<bytessize>32768</bytessize>
<CRC32>A764FC93</CRC32>
<directory></directory>
<closeMainApp>true</closeMainApp>
</name>

</update>
as you can see the individual XMLs have quiet a few bits of information connected to it.

so of the add fileds here may or may not be any use to you this just depends on what you want to use. e.g (CRC32, closeMainApp)

I'll post again later and let you know whta each field does for me so if you want to code for them you can.

pig.
Attached Images
File Type: png AutoUpdater.png (64.0 KB, 10 views)
Attached Files
File Type: txt tester .txt (598 Bytes, 6 views)
File Type: txt XMLs.txt (52 Bytes, 4 views)
Reply With Quote
  #13  
Old 02-24-2008, 06:21 PM
Zenzija Zenzija is offline
Newcomer
 
Join Date: Feb 2008
Posts: 8
Default

I've sort've given up on this. I'm developing something else at the moment. Once my programming class is over, I'll take a stab at it again. It was giving me a headache, and I was having problems, so I just gave up. I got it to connect to a FTP Server, and download a file, but everytime I ran it, it would download it, I couldn't get the CRC32 checking to work, and my professional coder friend couldn't either. So, I dunno. I'll re-do it later.
Reply With Quote
  #14  
Old 02-25-2008, 03:44 AM
piggybank1974's Avatar
piggybank1974 piggybank1974 is offline
Ultimate Contributor
 
Join Date: Mar 2002
Location: weston-super-mare(UK)
Posts: 1,795
Default

hi Zenzija

I'm sorry to here that you stopping do this project now, the CRC32 check is quite simple really. when your ready to start again post the code you have and I'll gladdy help in in anyway i can.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
FTP program that downloads files
FTP program that downloads files
FTP program that downloads files FTP program that downloads files
FTP program that downloads files
FTP program that downloads files
FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files FTP program that downloads files
FTP program that downloads files
FTP program that downloads files
 
FTP program that downloads files
FTP program that downloads files
 
-->