Sign in to follow this  
Followers 0
Qual-IT London

Wget

21 posts in this topic

Just ditched command line wget tool in place of this command i found in the autoIT manual (thanks ChrisL)

only thing is, it doesnt work! any ideas?

$us="nick"

$pw="password"

$ur="ftp.mydomain.com/updates"

AutoItSetOption ( "FtpBinaryMode" ,1 ) ; 1 binary

$get=InetGet("ftp://" & $us & ":" & $pw & "@" & $ur, "/*.exe")

While @InetGetActive

TrayTip("Updating Q-Backup", "Bytes = " & @InetGetBytesRead, 10, 16)

Sleep(250)

Wend

Share this post


Link to post
Share on other sites



Does InetGet method has got a "filename" as parameter

"ftp.fomain.com/updates" won't be a directory ?

maybe i'm wrong but it's what i believe

ciao

omlip

Share this post


Link to post
Share on other sites

Does InetGet method has got a "filename" as parameter

"ftp.fomain.com/updates" won't be a directory ?

maybe i'm wrong but it's what i believe

ciao

omlip

sorry?!

Share this post


Link to post
Share on other sites

sorry for my bad english

the method InetGeT take the filename as parameter, isn'it?

so i ask why you didn't do that

"ftp.domain.com/updates" is a file or directory?

a+

omlip

Share this post


Link to post
Share on other sites

Just ditched command line wget tool in place of this command i found in the autoIT manual (thanks ChrisL)

only thing is, it doesnt work! any ideas?

$us="nick"

$pw="password"

$ur="ftp.mydomain.com/updates"

AutoItSetOption ( "FtpBinaryMode" ,1 ) ; 1 binary

$get=InetGet("ftp://" & $us & ":" & $pw & "@" & $ur, "/*.exe")

While @InetGetActive

TrayTip("Updating Q-Backup", "Bytes = " & @InetGetBytesRead, 10, 16)

Sleep(250)

Wend

I don't see in the help where wildcards can be used in inetget, try just one file and see if that works.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

sorry for my bad english

the method InetGeT take the filename as parameter, isn'it?

so i ask why you didn't do that

"ftp.domain.com/updates" is a file or directory?

a+

omlip

/*.exe

or i've tried

/filename.exe

neither get the file!

Share this post


Link to post
Share on other sites

/*.exe

or i've tried

/filename.exe

neither get the file!

I would help more but don't have an ftp site to test from


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

I would help more but don't have an ftp site to test from

ftp://ftp.qualit-uk.com/

some exes here u can download

Share this post


Link to post
Share on other sites

I would help more but don't have an ftp site to test from

gary while ur here, do u know how to call a dll to fllush the disk caches on the system?

so u can just pull a removable drive out

Share this post


Link to post
Share on other sites

The second argumnet filename is the local filename you want the first argument to be saved to.

I do not think "/*.exe" or "/myfilename.txt" is valide filenames (due to the / and /*)?

Regards

Uten

Share this post


Link to post
Share on other sites

this works without having to set the option to binary

InetGet("ftp://ftp.qualit-uk.com/MULTIPAD.EXE", @ScriptDir & "\MULTIPAD.EXE", 1, 1)

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

MsgBox(0, "Bytes read", @InetGetBytesRead)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

yes like this, with only one files it works great since InetGet doesn't support wildcard

Share this post


Link to post
Share on other sites

yes like this, with only one files it works great since InetGet doesn't support wildcard

will it download the file if it already exists?

only want to download it if it has changed as its big!

Share this post


Link to post
Share on other sites

gary while ur here, do u know how to call a dll to fllush the disk caches on the system?

so u can just pull a removable drive out

Got nothing there for you.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Qual-IT London >>> yes it overwrite the file

Share this post


Link to post
Share on other sites

will it download the file if it already exists?

only want to download it if it has changed as its big!

can we make this function only download if the file is newer or different size?

Share this post


Link to post
Share on other sites

can we make this function only download if the file is newer or different size?

look at InetGetSize


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

look at InetGetSize

$remotesize=InetGetSize ( "ftp://" & $us & ":" & $pw & "@" & $ur & "/engine.exe" )

$localsize=Filegetsize(@scriptdir & "\engine.exe")

if $localsize <> $remotesize then

mayb this

Share this post


Link to post
Share on other sites

$remotesize=InetGetSize ( "ftp://" & $us & ":" & $pw & "@" & $ur & "/engine.exe" )

$localsize=Filegetsize(@scriptdir & "\engine.exe")

if $localsize <> $remotesize then

mayb this

That should work for size

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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