Sign in to follow this  
Followers 0
t0ddie

destination directory for inetget?

10 posts in this topic

i would like to dl a file to another directory besides my desktop.

i dont see a destination directory available. is this just reading the default on your computer that you have set for where you want files to be downloaded to?

if so...

is there a way to change this setting temporarily to another directory, dl the file, then change it back to the original directory?


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Doesn't this work?

InetGet ( "www.someplace.com/something.zip", "C:/Some Folder/Somename.zip")

Edit: If that doesn't work perhaps FileChangeDir ( "path" ) might.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

hmm, it seemed to work, although the command does not say there is a parameter for destination directory in the Scite Editor.

cool.

how can i invoke the windows progressbar to measure the file download? i think it would be better to use that then to try to create one.


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

how can i invoke the windows progressbar to measure the file download? i think it would be better to use that then to try to create one.

<{POST_SNAPBACK}>

Can't I don't think. Shouldn't be too hard to make a progress bar.

@InetGetBytesRead / InetGetSize ( "URL" ) * 100

To get a percent so you can set the progress bar.


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

ooh! didnt see that

thats cool ill look into that now


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

i still cant get how to put it to use exactly, i am having a little trouble.


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

Try this one..

$remoteFile = "http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3.zip"
$localFile = @ScriptDir & "\autoit-v3.zip"

$fileSize = InetGetSize($remoteFile)
InetGet($remoteFile,$localFile,1,1)

While 1
    Sleep(50)
    If NOT @InetGetActive Then ExitLoop 
    
    ToolTip("Progress : " & Round(@InetGetBytesRead * 100 / $fileSize) & "%")
WEnd

Share this post


Link to post
Share on other sites

thank you so much helge!


Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

what hapend to reading the manual before posting ?

InetGet ( "URL", "filename" [, reload [, background]] )

InetGet("http://www.mozilla.org", "C:\foo.html")
InetGet("http://www.autoitscript.com", "C:\mydownload.htm", 1)
InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1)


; Advanced example - downloading in the background
InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1)

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
  Sleep(250)
Wend

MsgBox(0, "Bytes read", @InetGetBytesRead)
Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

Manual? What's a manual? I've never heard of a manual before...

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