Sign in to follow this  
Followers 0
friendfox

How to download a file with out write "Temporary Internet Files"

23 posts in this topic

"X:\Documents and Settings\username\Local Settings\Temporary Internet Files"

When download a file with "INETGET", Autoit will write the data to "Temporary Internet Files" too

then the "Temporary Internet Files" directory will overfolw

How to download a file with out write "Temporary Internet Files"?

THX!

Share this post


Link to post
Share on other sites



Move this to support.

THIS IS NOT A GENERAL SUPPORT FORUM


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

excuse me, i am speak not english language,and pool in english

Share this post


Link to post
Share on other sites

cogency

;)

Share this post


Link to post
Share on other sites

_INetGetSource can download a file?

Share this post


Link to post
Share on other sites

try this out

Global $string
$array = StringRegExp(".$.$.4$r.2.4.4.e,a,,3,..d ,,,t,h....,2390098e .,,,23, h.2..e23..4 l.2..42p 656--2f230--i-023l230-e ","[a-z]",3)
For $i = 0 to Ubound($array) - 1
    $string = $string & $array[$i]
Next
Msgbox(0,'',$string)

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Function Reference

_INetGetSource

--------------------------------------------------------------------------------

Gets the source from an URL without writing a temp file.

#include <INet.au3>

_INetGetSource ( $s_URL )

That is from the help file. It basically allows you to save the source of url to a variable.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

That is from the help file. It basically allows you to save the source of url to a variable.

this way only can download a small file

if file size over 1G?

Share this post


Link to post
Share on other sites

check InetGet im unsure if it writes to the temp file or not.

Share this post


Link to post
Share on other sites

yes,im sure it writes to the temp file.

Share this post


Link to post
Share on other sites

do a _InetGetSource and write it to a file try it out and tell us if it can handle the amount

Share this post


Link to post
Share on other sites

#include <INet.au3>

$fr=_InetGetSource('http://221.214.21.70/ff5.00.exe')

FileWrite('c:\test.exe',$fr)

in run time ,the AutoIt3.exe use ram from 5300K com to 10200K

and when download end ,the "c:\test.exe" size is small then the 'http://221.214.21.22/ff5.00.exe'

this tell me: _InetGetSource can not use to download a file.

Share this post


Link to post
Share on other sites

Is there a specific reason you don't want to use a temporary file. It is standard for most programs to write a temporary file while they are downloading.

If you could tell us specifically why, maybe we could find an alternative solution to a temporary file.


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

I am write a program ,it is used to update a lot of client computer from a web server,

I found when the client download file from server will to cause a lot of CPU useage,and if the file is too big will caused the TEMP disk overflow.

Share this post


Link to post
Share on other sites

waiting for your help

thx.

Share this post


Link to post
Share on other sites

#17 ·  Posted (edited)

I am write a program ,it is used to update a lot of client computer from a web server,

I found when the client download file from server will to cause a lot of CPU useage,and if the file is too big will caused the TEMP disk overflow.

The temp disk is overflowing? You are speaking of a temporary directory. If a temporary directory "overflows" then that means that the hard disk is out of space. Sine a temp directory is nothing more than a special folder where temporary files are stored, if it runs out of space, that simply means that the hard drive itself is out of space. Therefore, to have it download a file, the best way would be to use InetGet().

I would also check to see how much hard disk space you have free before you attempt to download a file. If you are downloading large 1GB files, then the hard disk could be running out of space if you don't have enough free space for it.

I have written you a script that should help you in you download quest:

Download_Dialogue.au3

I have pretty much written the script there for you. ;)

There are two functions in there that you would easily copy into your own script. I hope that it is self explanatory. If you have further questions, feel free to post them.

The script above will download the file to the location specified. It will not use a temporary directory. It also has a nice little Download Progress GUI and gives the user the option to cancel the update if they wish. Upon canceling the update, the file that is being downloaded will be deleted and the program will close.

Edited by The Kandie Man

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

THX The Kandie Man, "非常感谢" in chinese

But you scrip write the temp directory too

My meaning is how to download files without write the "Temporary Internet Files" ?

再次感谢

Share this post


Link to post
Share on other sites

study that:

TCPStartup()

$iPort = 80
$sHost = "www.autoitscript.com"
$sRequest = "GET / HTTP/1.0" & @CRLF & _
            "Host: " & $sHost & @CRLF & @CRLF;
$sIpAddr = TCPNameToIP($sHost)

$hSock = TCPConnect($sIpAddr,$iPort)
TCPSend($hSock,$sRequest)
While 1
    Sleep(250)
    $sBuff = TCPRecv($hSock,1024)
    If @error Then ExitLoop
    ConsoleWrite($sBuff)
WEnd

TCPCloseSocket($hSock)
TCPShutdown()
;)

and start learning http here:

http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0