View Single Post
  #5 (permalink)  
Old 08-25-2009, 12:06 AM
Zenerdiode Zenerdiode is offline
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 269
Awards Showcase
Beta Tester 
Total Awards: 1
Default

There's just something about your loops...

Take the DeleteOld program. You are forcing an endless loop; then evaluating a condition and breaking out of the loop when false. Well thats exactly what 'Do While <condition is true>' .... 'Loop' does itself.

Try this for your DeleteOld.exe

Code:
<font color="Blue">Sub</font> App_Start
    <font color=
"blue">Sleep</font> (<font color="Purple">1000</font>)
    <font color=
"blue">Do While FileExist</font>(<font color="DarkRed">"Image"</font> & current & <font color="darkred">".jpg"</font>)
        <font color=
"blue">FileDel</font>(<font color="darkred">"Image"</font> & current & <font color="darkred">".jpg"</font>)
        current = current + <font color=
"purple">1</font>
    <font color=
"blue">Loop</font>
<font color=
"blue">End Sub</font>
Reply With Quote