Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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.

 

Posted

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!

Posted

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

Posted

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

Posted

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.

 

Posted

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!

Posted

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?

Posted

look at InetGetSize

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

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

if $localsize <> $remotesize then

mayb this

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
×
×
  • Create New...