Sign in to follow this  
Followers 0
Clever1mba

FileExists Download Problem

3 posts in this topic

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

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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'

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

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