Jump to content
Sign in to follow this  
Systems By

Need some help again

Recommended Posts

Hi everyone. I need to do a simple change with the following code:

For $x = $aRecords[0] To 6 Step - 1

    $aRecords[$x] = StringStripWS($aRecords[$x],3)

    If Not FileExists($homepcbudir &$aRecords) Then MsgBox(64, 'Info', 'File ' & $homepcbudir & $aRecords[$x] & ' Does not exist')

    

    If $aRecords[$x] <> "" Then

        Do

            FileDelete($homepcbudir & $aRecords[$x])

            ToolTip('On this file:' & @CR & $homepcbudir & $aRecords[$x], 0, 0)

            Sleep(500)

        Until Not FileExists($homepcbudir & $aRecords[$x])

     ;SplashTextOn("Autobackup", "Deleting " & $home & $aRecords[$x], 200, 150)

        Sleep(200)

     ;SplashOff()

    EndIf

Next

Is it possible to modify this line:

For $x = $aRecords[0] To 6 Step - 1

so that the program performs the for statement on the first four files in the array only? I have looked all over and although it's probably the easiest thing to do, I am having a hard time doing the modification.

Thanks.

Edited by Systems By

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  

×
×
  • Create New...