Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Has anyone been successful with downloading large files via VBScript? My script is below and it is erroring out downloading a file over a 1GB. Small files it works with no problem. Do I need to try a different method? The error message it gives me is below. Thanks in advance for any suggestions!

strFileURL = "http://10.0.0.0/File.zip"
strHDLocation = "C:\File.zip"


Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")

objXMLHTTP.open "GET", strFileURL, false
objXMLHTTP.setTimeouts 1000 * 60 * 60, 1000 * 60 * 60, 1000 * 60 * 60, 1000 * 60 * 60
objXMLHTTP.send()

If objXMLHTTP.Status = 200 Then
  Set objADOStream = CreateObject("ADODB.Stream")
  objADOStream.Open
  objADOStream.Type = 1 'adTypeBinary

  objADOStream.Write objXMLHTTP.ResponseBody
  objADOStream.Position = 0    'Set the stream position to the start

  Set objFSO = Createobject("Scripting.FileSystemObject")
If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation

  objADOStream.SaveToFile strHDLocation
  objADOStream.Close
  Set objADOStream = Nothing
End if

Set objXMLHTTP = Nothing
Set objFSO = Nothing

The error message I receive is:

Error: Not enough storage is available to complete this operation.
Code: 8007000E
Source: msxml3.dll
share|improve this question
add comment

1 Answer

"Error: Not enough storage is available to complete this operation."

Have you checked to ensure that you actually have enough disk space for the download file?

share|improve this answer
    
Yes, the problem is not the disk space. Disk is 80% free. That error message has to be pertaining to something else rather than the disk space. –  ChriSxStyles Jun 19 '11 at 1:57
1  
Then you might look through the possible VB Script settings for any possible limits which might need to be raised. Also check the possible "temp" settings/definitions to ensure it is not parked somewhere which may be attributing to the situation. –  user48838 Jun 19 '11 at 3:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.