Erase ListOfFailedFiles.txt lnFiles = adir(laDir,'*.fxp') for lnX = 1 to lnFiles Try Erase (laDir(lnX,1)) Catch Strtofile(laDir(lnX,1),'ListOfFailedFiles.txt',1) EndTry Endfor If adir(laDir,'ListOfFailedFiles.txt')>0 modi file ListOfFailedFiles.txt Endif>The count is correct - but the program never actually finishes the full cycle - I placed this before the TR to monitor the processes
>WAIT WINDOW (laDir(lnX)) >>I found that I was getting 5 different stops on each fxp file - so that if the lnfiles count is multiplied by 5 it makes it through.
>>Erase ListOfFailedFiles.txt >>lnFiles = adir(laDir,'*.fxp') >>for lnX = 1 to lnFiles >> Try >> Erase (laDir(lnX)) >> Catch >> Strtofile(laDir(lnX),'ListOfFailedFiles.txt',1) >> EndTry >>Endfor >>If adir(laDir,'ListOfFailedFiles.txt')>0 >> modi file ListOfFailedFiles.txt >>Endif>>
>>>Erase C:/mydir/*.FXP
>>>
>>>I am trying an< if error()=1719 > then diverting to an error handler.