Jump to content

Set Value File Size..


eri
 Share

Recommended Posts

How to Set Value size 0 ~ 500 Kb in this script..

ceksize()
 Func ceksize()
    $location = @ScriptDir &"\sample.exe"
    $size = FileGetSize($location)
   If $size = (0~500 kb) Then ; File Size 0 kb ~ 500 kb
      MsgBox(0,"Info","Ok This Application Compatible With Your Application")
   Else
      MsgBox(0,"Info","This Application Not Compatible With Your Application")
   EndIf
 EndFunc

if file size 0~500 kb OK..

if file size bigger than 500 kb Exit..

Link to comment
Share on other sites

Next time i would advice you to use ConsoleWrite if you not sure what variable it gives and why you dont get what you want. In this situation you could use ConsoleWrite("Size = " & $size & @CRLF), so you could notice, that result is in Bytes and if you want to compare with [KB], you just need to do as it was replyed by other person.

Link to comment
Share on other sites

Next time i would advice you to use ConsoleWrite if you not sure what variable it gives and why you dont get what you want. In this situation you could use ConsoleWrite("Size = " & $size & @CRLF), so you could notice, that result is in Bytes and if you want to compare with [KB], you just need to do as it was replyed by other person.

Thannk`s Makaule.. I will try later..
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...