Announcement

Collapse
No announcement yet.

Check filesize?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Check filesize?

    Can I check filesize *.dat ?
    When filesize =xxxkb is play app. or exit

    Is possible?

  • #2
    Re: Check filesize?

    Yep:

    %FileInfo% = File.GetInformation (Size, "%WinDir%\SysFile.Dll")

    Returns the size of SysFile.Dll in bytes.

    Then use an IF statement to check the size.

    Comment


    • #3
      Re: Check filesize?

      Hi worm!

      I can't.. Can You write me the 'IF' Statement please.

      I'm total newbie..


      ON Initilize Check Filesize in CD AVSEQ01.dat IF Filesize not 618.657kb is Exit App.

      Thanks...

      Comment


      • #4
        Re: Check filesize?

        Try something along these lines.

        On initialise.

        <IR_ACTIONS_LIST>
        <Action name="Get Information">
        <Type>14</Type>
        <Function>0</Function>
        <DTIndentLevel>0</DTIndentLevel>
        <Enabled>1</Enabled>
        <ErrorHandling>
        <UserNotificationMode>2</UserNotificationMode>
        <CustomErrorMessage/>
        <OnErrorAction>0</OnErrorAction>
        <JumpToLabel/>
        </ErrorHandling>
        <FileInformationToCollect>2</FileInformationToCollect>
        <Variable>%FileInfo%</Variable>
        <FileName>%SrcDir%\AVSEQ01.DAT</FileName>
        </Action>
        <Action name="IF">
        <Type>200</Type>
        <Function>1</Function>
        <DTIndentLevel>0</DTIndentLevel>
        <Enabled>1</Enabled>
        <ErrorHandling>
        <UserNotificationMode>2</UserNotificationMode>
        <CustomErrorMessage/>
        <OnErrorAction>0</OnErrorAction>
        <JumpToLabel/>
        </ErrorHandling>
        <Condition>%FileInfo% != 618657000</Condition>
        </Action>
        <Action name="Timed Message">
        <Type>52</Type>
        <Function>0</Function>
        <DTIndentLevel>1</DTIndentLevel>
        <Enabled>1</Enabled>
        <ErrorHandling>
        <UserNotificationMode>2</UserNotificationMode>
        <CustomErrorMessage/>
        <OnErrorAction>0</OnErrorAction>
        <JumpToLabel/>
        </ErrorHandling>
        <DialogMessage>File error, application closing ....</DialogMessage>
        <Seconds>6</Seconds>
        </Action>
        <Action name="Exit">
        <Type>2</Type>
        <Function>0</Function>
        <DTIndentLevel>0</DTIndentLevel>
        <Enabled>1</Enabled>
        <ErrorHandling>
        <UserNotificationMode>2</UserNotificationMode>
        <CustomErrorMessage/>
        <OnErrorAction>0</OnErrorAction>
        <JumpToLabel/>
        </ErrorHandling>
        </Action>
        <Action name="END IF">
        <Type>201</Type>
        <Function>1</Function>
        <DTIndentLevel>0</DTIndentLevel>
        <Enabled>1</Enabled>
        <ErrorHandling>
        <UserNotificationMode>2</UserNotificationMode>
        <CustomErrorMessage/>
        <OnErrorAction>0</OnErrorAction>
        <JumpToLabel/>
        </ErrorHandling>
        </Action>
        </IR_ACTIONS_LIST>

        Comment


        • #5
          Re: Check filesize?

          You go John-OH! [img]/ubbthreads/images/icons/smile.gif[/img]

          Comment

          Working...
          X