Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grab URL from net to file
#3
One thing you need to watch out for is corrupting your data file.

Open Urlfile$ For Binary As #filehandle <-- This is where you open your file.

Before that line, add this one: Open Urlfile$ For OUTPUT As #filehandle: CLOSE #filehandle

As it exists, you could have the file already on the drive (lets say at 100,000 bytes of data), and then you choose not to erase it. When you download the new version of the file, it's only 96,000 bytes in size -- so it'll overwrite those first 96,000 bytes and then leave the rest unchanged. You need to blank that file before writing to it, or else you're just asking for trouble in the future with left over data.
Reply


Messages In This Thread
Grab URL from net to file - by eoredson - 11-07-2023, 07:39 AM
RE: Grab URL from net to file - by SMcNeill - 11-07-2023, 03:12 PM
RE: Grab URL from net to file - by eoredson - 11-08-2023, 12:11 AM



Users browsing this thread: 2 Guest(s)