| Mirage Source http://web.miragesource.net/forums/ |
|
| Working on an autoupdater http://web.miragesource.net/forums/viewtopic.php?f=201&t=3695 |
Page 1 of 1 |
| Author: | Rian [ Wed May 07, 2008 2:39 am ] |
| Post subject: | Working on an autoupdater |
And I'm trying to make it support downloading files into subdirectories. It collects the file from the right subdirectory on my webserver, but when it saves it, it gives me the old "file not found" routine. This is my sub for downloading: Code: Public Function DownloadUpdates(srcFileName As String, targetFileName As String, SubDir As String) Dim B() As Byte Dim FID As Byte B() = frmUpdate.Inet.OpenURL(Path & SubDir & srcFileName, icByteArray) FID = FreeFile targetFileName = SubDir & srcFileName Open targetFileName For Binary Access Write As #FID Put #FID, , B() Close #FID DoEvents End Function I get the file not found on this line here: Code: Open targetFileName For Binary Access Write As #FID To answer any future questions, yes, this is mostly copied from a popular updater on pscode.com, and no, I don't really know what I'm doing here. I mean, i do. I can make it write the file in the root directory that the updater is in, but SubDir holds the target subdirectory, like \GFX\ |
|
| Author: | Lea [ Wed May 07, 2008 3:50 am ] |
| Post subject: | Re: Working on an autoupdater |
FID should be dimmed to an Integer. Secondly, try removing the words "Access Write" and try just using Open targetFileName For Binary As #FID or try Open targetFileName For Binary Write As #FID |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|