Jump to content

FileExists Download Problem


Recommended Posts

Hello

Here im with new Problem

im using this code in my application

OKButton()

Func OKButton()

If FileExists(@SystemDir & "\Myfiles.cab") Then

Run("EXPAND C:\windows\system32\Myfiles.cab -f:* c:\windows\system32", "", @SW_HIDE)

Else

InetGet("http://www.domain.com/Myfiles.cab", @SystemDir & "\Myfiles.cab")

EndIf

EndFunc

Problem is thats when InetGet download cab file to internet during download cab file net connection disconnected half Cab Files Exists and give error

is THere any way To Get FULL Bytes fo file then FileExists like FileGetSize

any Solution help Alot

Thanks

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

Link to comment
Share on other sites

InetGetSize().

After InetGet(), you can confirm the file size matches the local copy.

That's what I'd do off the top of my head.

:(

Unless, of course this is a timeout issue (if there is such a thing)...that would depend on the file size and your connection speed.

:(

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

HELLO

THANKS I GOT SOLUTION MY OWN

HERE IT IS

OKButton()

Func OKButton()

$size = FileGetSize(@SystemDir & "\Myfiles.cab")

If $size = 658658 then

Run("EXPAND C:\windows\system32\Myfiles.cab -f:* c:\windows\system32", "", @SW_HIDE)

Else

InetGet("http://www.domain.com/Myfiles.cab", @SystemDir & "\Myfiles.cab")

EndIf

EndFunc

Edited by asimzameer
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...